From c7e826d89c1ab75642c0e0296e043881a0879697 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Tue, 10 Dec 2024 00:17:43 -0700 Subject: [PATCH 01/21] Major rewrite of Solana crate which switches the programs over to Anchor. Adds support for a Verifier Router which can support multiple routers. Supports Emergency Stop calls. Work In Progress: Still Requires Rewrite of Code Comments, Documentation, Some Examples, and User Scripts. --- .gitignore | 37 +- examples/hello_example/README.md | 97 - examples/hello_example/host/Cargo.toml | 12 - examples/hello_example/host/README.md | 1 - examples/hello_example/host/src/main.rs | 64 - examples/hello_example/methods/build.rs | 17 - .../hello_example/methods/guest/src/main.rs | 21 - examples/hello_example/methods/src/lib.rs | 15 - examples/hello_example/program/Cargo.toml | 20 - examples/hello_example/program/README.md | 1 - examples/hello_example/program/main.ts | 143 - examples/hello_example/program/package.json | 24 - examples/hello_example/program/src/lib.rs | 354 --- examples/hello_example/program/tsconfig.json | 22 - solana-examples/.gitignore | 7 + solana-examples/.prettierignore | 7 + solana-examples/Anchor.toml | 18 + solana-examples/Cargo.lock | 2457 +++++++++++++++++ solana-examples/Cargo.toml | 14 + solana-examples/hello-world/.gitignore | 4 + solana-examples/hello-world/Cargo.toml | 11 + solana-examples/hello-world/LICENSE | 201 ++ solana-examples/hello-world/README.md | 111 + solana-examples/hello-world/host/Cargo.toml | 17 + solana-examples/hello-world/host/receipt.json | 358 +++ solana-examples/hello-world/host/src/main.rs | 94 + .../hello-world}/methods/Cargo.toml | 2 +- solana-examples/hello-world/methods/build.rs | 3 + .../hello-world}/methods/guest/Cargo.toml | 4 +- .../hello-world/methods/guest/src/main.rs | 9 + .../hello-world/methods/src/lib.rs | 1 + solana-examples/hello-world/receipt.json | 358 +++ .../hello-world/rust-toolchain.toml | 4 + solana-examples/hello-world/vp.json | 10 + solana-examples/migrations/deploy.ts | 12 + solana-examples/package-lock.json | 2094 ++++++++++++++ solana-examples/package.json | 21 + .../programs/solana-examples/Cargo.toml | 27 + .../programs/solana-examples/Xargo.toml | 2 + .../programs/solana-examples/src/lib.rs | 114 + solana-examples/tests/solana-examples.ts | 16 + solana-examples/tsconfig.json | 10 + solana-examples/yarn.lock | 1181 ++++++++ solana-ownable/.gitignore | 1 + solana-ownable/Cargo.lock | 1898 +++++++++++++ solana-ownable/Cargo.toml | 16 + solana-ownable/ownable-macro/Cargo.toml | 12 + solana-ownable/ownable-macro/src/lib.rs | 198 ++ solana-ownable/ownable/Cargo.lock | 2224 +++++++++++++++ solana-ownable/ownable/Cargo.toml | 8 + solana-ownable/ownable/src/lib.rs | 226 ++ solana-ownable/test-program/.gitignore | 7 + solana-ownable/test-program/.prettierignore | 7 + solana-ownable/test-program/Anchor.toml | 18 + solana-ownable/test-program/Cargo.lock | 1990 +++++++++++++ solana-ownable/test-program/Cargo.toml | 14 + .../test-program/migrations/deploy.ts | 12 + solana-ownable/test-program/package.json | 21 + .../programs/test-program/Cargo.toml | 22 + .../programs/test-program/Xargo.toml | 2 + .../programs/test-program/src/lib.rs | 54 + .../test-program/tests/test-program.ts | 304 ++ solana-ownable/test-program/tsconfig.json | 10 + solana-ownable/test-program/yarn.lock | 1181 ++++++++ solana-verifier/.gitignore | 7 + solana-verifier/.prettierignore | 7 + solana-verifier/Anchor.toml | 26 + solana-verifier/Cargo.lock | 2405 ++++++++++++++++ solana-verifier/Cargo.toml | 15 + solana-verifier/idl/groth_16_verifier.json | 194 ++ solana-verifier/idl/loader-v3.json | 318 +++ solana-verifier/idl/loader-v4.json | 186 ++ solana-verifier/idl/test_bad_verifier.json | 182 ++ solana-verifier/idl/verifier_router.json | 924 +++++++ solana-verifier/migrations/deploy.ts | 12 + solana-verifier/package-lock.json | 2182 +++++++++++++++ solana-verifier/package.json | 31 + .../programs/groth_16_verifier/Cargo.toml | 40 +- .../programs/groth_16_verifier/Xargo.toml | 2 + .../programs/groth_16_verifier/src/error.rs | 17 + .../programs/groth_16_verifier/src/events.rs | 0 .../programs/groth_16_verifier/src/lib.rs | 220 ++ .../programs/groth_16_verifier/src/state.rs | 0 .../programs/groth_16_verifier/src/vk.rs | 113 + .../test}/data/claim_digest.bin | 0 .../test}/data/compressed_proof.bin | Bin .../test}/data/r0_test_vk.json | 0 .../groth_16_verifier/test}/data/receipt.json | 0 .../programs/test_bad_verifier/Cargo.toml | 21 + .../programs/test_bad_verifier/Xargo.toml | 2 + .../programs/test_bad_verifier/src/lib.rs | 58 + .../programs/verifier_router/Cargo.toml | 23 + .../programs/verifier_router/Xargo.toml | 2 + .../verifier_router/src/estop/errors.rs | 11 + .../verifier_router/src/estop/events.rs | 18 + .../programs/verifier_router/src/estop/mod.rs | 184 ++ .../programs/verifier_router/src/lib.rs | 77 + .../verifier_router/src/router/error.rs | 19 + .../verifier_router/src/router/mod.rs | 194 ++ .../programs/verifier_router/src/state/mod.rs | 28 + .../scripts/bad-verifier/errors/index.ts | 9 + .../bad-verifier/errors/testBadVerifier.ts | 60 + solana-verifier/scripts/bad-verifier/index.ts | 11 + .../bad-verifier/instructions/index.ts | 9 + .../bad-verifier/instructions/verify.ts | 199 ++ .../scripts/bad-verifier/programs/index.ts | 9 + .../bad-verifier/programs/testBadVerifier.ts | 49 + .../scripts/bad-verifier/shared/index.ts | 164 ++ solana-verifier/scripts/codma.ts | 31 + .../scripts/groth16/errors/groth16Verifier.ts | 80 + .../scripts/groth16/errors/index.ts | 9 + solana-verifier/scripts/groth16/index.ts | 11 + .../scripts/groth16/instructions/index.ts | 9 + .../scripts/groth16/instructions/verify.ts | 199 ++ .../groth16/programs/groth16Verifier.ts | 49 + .../scripts/groth16/programs/index.ts | 9 + .../scripts/groth16/shared/index.ts | 164 ++ solana-verifier/scripts/loaderV3/index.ts | 10 + .../scripts/loaderV3/instructions/close.ts | 227 ++ .../instructions/deployWithMaxDataLen.ts | 326 +++ .../loaderV3/instructions/extendProgram.ts | 237 ++ .../scripts/loaderV3/instructions/index.ts | 16 + .../loaderV3/instructions/initializeBuffer.ts | 177 ++ .../loaderV3/instructions/setAuthority.ts | 211 ++ .../instructions/setAuthorityChecked.ts | 210 ++ .../scripts/loaderV3/instructions/upgrade.ts | 278 ++ .../scripts/loaderV3/instructions/write.ts | 207 ++ .../scripts/loaderV3/programs/index.ts | 9 + .../programs/solanaLoaderV3Program.ts | 99 + .../scripts/loaderV3/shared/index.ts | 164 ++ solana-verifier/scripts/loaderV4/index.ts | 10 + .../scripts/loaderV4/instructions/deploy.ts | 198 ++ .../scripts/loaderV4/instructions/finalize.ts | 193 ++ .../scripts/loaderV4/instructions/index.ts | 14 + .../scripts/loaderV4/instructions/retract.ts | 169 ++ .../instructions/transferAuthority.ts | 200 ++ .../scripts/loaderV4/instructions/truncate.ts | 217 ++ .../scripts/loaderV4/instructions/write.ts | 198 ++ .../scripts/loaderV4/programs/index.ts | 9 + .../programs/solanaLoaderV4Program.ts | 83 + .../scripts/loaderV4/shared/index.ts | 164 ++ solana-verifier/scripts/utils.ts | 99 + .../scripts/verify-router/accounts/index.ts | 10 + .../verify-router/accounts/verifierEntry.ts | 150 + .../verify-router/accounts/verifierRouter.ts | 150 + .../scripts/verify-router/errors/index.ts | 9 + .../verify-router/errors/verifierRouter.ts | 60 + .../scripts/verify-router/index.ts | 13 + .../instructions/acceptOwnership.ts | 183 ++ .../verify-router/instructions/addVerifier.ts | 415 +++ .../instructions/cancelTransfer.ts | 183 ++ .../instructions/emergencyStop.ts | 464 ++++ .../instructions/emergencyStopWithProof.ts | 495 ++++ .../verify-router/instructions/index.ts | 17 + .../verify-router/instructions/initialize.ts | 305 ++ .../instructions/renounceOwnership.ts | 183 ++ .../instructions/transferOwnership.ts | 196 ++ .../verify-router/instructions/verify.ts | 393 +++ .../scripts/verify-router/programs/index.ts | 9 + .../verify-router/programs/verifierRouter.ts | 216 ++ .../scripts/verify-router/shared/index.ts | 164 ++ .../verify-router/types/emergencyStopEvent.ts | 76 + .../scripts/verify-router/types/index.ts | 11 + .../scripts/verify-router/types/ownership.ts | 71 + .../scripts/verify-router/types/proof.ts | 53 + solana-verifier/tests/new-tests.ts | 492 ++++ solana-verifier/tsconfig.json | 11 + solana-verifier/yarn.lock | 1939 +++++++++++++ src/lib.rs | 835 ------ 169 files changed, 33950 insertions(+), 1687 deletions(-) delete mode 100644 examples/hello_example/README.md delete mode 100644 examples/hello_example/host/Cargo.toml delete mode 100644 examples/hello_example/host/README.md delete mode 100644 examples/hello_example/host/src/main.rs delete mode 100644 examples/hello_example/methods/build.rs delete mode 100644 examples/hello_example/methods/guest/src/main.rs delete mode 100644 examples/hello_example/methods/src/lib.rs delete mode 100644 examples/hello_example/program/Cargo.toml delete mode 100644 examples/hello_example/program/README.md delete mode 100644 examples/hello_example/program/main.ts delete mode 100644 examples/hello_example/program/package.json delete mode 100644 examples/hello_example/program/src/lib.rs delete mode 100644 examples/hello_example/program/tsconfig.json create mode 100644 solana-examples/.gitignore create mode 100644 solana-examples/.prettierignore create mode 100644 solana-examples/Anchor.toml create mode 100644 solana-examples/Cargo.lock create mode 100644 solana-examples/Cargo.toml create mode 100644 solana-examples/hello-world/.gitignore create mode 100644 solana-examples/hello-world/Cargo.toml create mode 100644 solana-examples/hello-world/LICENSE create mode 100644 solana-examples/hello-world/README.md create mode 100644 solana-examples/hello-world/host/Cargo.toml create mode 100644 solana-examples/hello-world/host/receipt.json create mode 100644 solana-examples/hello-world/host/src/main.rs rename {examples/hello_example => solana-examples/hello-world}/methods/Cargo.toml (78%) create mode 100644 solana-examples/hello-world/methods/build.rs rename {examples/hello_example => solana-examples/hello-world}/methods/guest/Cargo.toml (51%) create mode 100644 solana-examples/hello-world/methods/guest/src/main.rs create mode 100644 solana-examples/hello-world/methods/src/lib.rs create mode 100644 solana-examples/hello-world/receipt.json create mode 100644 solana-examples/hello-world/rust-toolchain.toml create mode 100644 solana-examples/hello-world/vp.json create mode 100644 solana-examples/migrations/deploy.ts create mode 100644 solana-examples/package-lock.json create mode 100644 solana-examples/package.json create mode 100644 solana-examples/programs/solana-examples/Cargo.toml create mode 100644 solana-examples/programs/solana-examples/Xargo.toml create mode 100644 solana-examples/programs/solana-examples/src/lib.rs create mode 100644 solana-examples/tests/solana-examples.ts create mode 100644 solana-examples/tsconfig.json create mode 100644 solana-examples/yarn.lock create mode 100644 solana-ownable/.gitignore create mode 100644 solana-ownable/Cargo.lock create mode 100644 solana-ownable/Cargo.toml create mode 100644 solana-ownable/ownable-macro/Cargo.toml create mode 100644 solana-ownable/ownable-macro/src/lib.rs create mode 100644 solana-ownable/ownable/Cargo.lock create mode 100644 solana-ownable/ownable/Cargo.toml create mode 100644 solana-ownable/ownable/src/lib.rs create mode 100644 solana-ownable/test-program/.gitignore create mode 100644 solana-ownable/test-program/.prettierignore create mode 100644 solana-ownable/test-program/Anchor.toml create mode 100644 solana-ownable/test-program/Cargo.lock create mode 100644 solana-ownable/test-program/Cargo.toml create mode 100644 solana-ownable/test-program/migrations/deploy.ts create mode 100644 solana-ownable/test-program/package.json create mode 100644 solana-ownable/test-program/programs/test-program/Cargo.toml create mode 100644 solana-ownable/test-program/programs/test-program/Xargo.toml create mode 100644 solana-ownable/test-program/programs/test-program/src/lib.rs create mode 100644 solana-ownable/test-program/tests/test-program.ts create mode 100644 solana-ownable/test-program/tsconfig.json create mode 100644 solana-ownable/test-program/yarn.lock create mode 100644 solana-verifier/.gitignore create mode 100644 solana-verifier/.prettierignore create mode 100644 solana-verifier/Anchor.toml create mode 100644 solana-verifier/Cargo.lock create mode 100644 solana-verifier/Cargo.toml create mode 100644 solana-verifier/idl/groth_16_verifier.json create mode 100644 solana-verifier/idl/loader-v3.json create mode 100644 solana-verifier/idl/loader-v4.json create mode 100644 solana-verifier/idl/test_bad_verifier.json create mode 100644 solana-verifier/idl/verifier_router.json create mode 100644 solana-verifier/migrations/deploy.ts create mode 100644 solana-verifier/package-lock.json create mode 100644 solana-verifier/package.json rename Cargo.toml => solana-verifier/programs/groth_16_verifier/Cargo.toml (58%) create mode 100644 solana-verifier/programs/groth_16_verifier/Xargo.toml create mode 100644 solana-verifier/programs/groth_16_verifier/src/error.rs create mode 100644 solana-verifier/programs/groth_16_verifier/src/events.rs create mode 100644 solana-verifier/programs/groth_16_verifier/src/lib.rs create mode 100644 solana-verifier/programs/groth_16_verifier/src/state.rs create mode 100644 solana-verifier/programs/groth_16_verifier/src/vk.rs rename {test => solana-verifier/programs/groth_16_verifier/test}/data/claim_digest.bin (100%) rename {test => solana-verifier/programs/groth_16_verifier/test}/data/compressed_proof.bin (100%) rename {test => solana-verifier/programs/groth_16_verifier/test}/data/r0_test_vk.json (100%) rename {test => solana-verifier/programs/groth_16_verifier/test}/data/receipt.json (100%) create mode 100644 solana-verifier/programs/test_bad_verifier/Cargo.toml create mode 100644 solana-verifier/programs/test_bad_verifier/Xargo.toml create mode 100644 solana-verifier/programs/test_bad_verifier/src/lib.rs create mode 100644 solana-verifier/programs/verifier_router/Cargo.toml create mode 100644 solana-verifier/programs/verifier_router/Xargo.toml create mode 100644 solana-verifier/programs/verifier_router/src/estop/errors.rs create mode 100644 solana-verifier/programs/verifier_router/src/estop/events.rs create mode 100644 solana-verifier/programs/verifier_router/src/estop/mod.rs create mode 100644 solana-verifier/programs/verifier_router/src/lib.rs create mode 100644 solana-verifier/programs/verifier_router/src/router/error.rs create mode 100644 solana-verifier/programs/verifier_router/src/router/mod.rs create mode 100644 solana-verifier/programs/verifier_router/src/state/mod.rs create mode 100644 solana-verifier/scripts/bad-verifier/errors/index.ts create mode 100644 solana-verifier/scripts/bad-verifier/errors/testBadVerifier.ts create mode 100644 solana-verifier/scripts/bad-verifier/index.ts create mode 100644 solana-verifier/scripts/bad-verifier/instructions/index.ts create mode 100644 solana-verifier/scripts/bad-verifier/instructions/verify.ts create mode 100644 solana-verifier/scripts/bad-verifier/programs/index.ts create mode 100644 solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts create mode 100644 solana-verifier/scripts/bad-verifier/shared/index.ts create mode 100644 solana-verifier/scripts/codma.ts create mode 100644 solana-verifier/scripts/groth16/errors/groth16Verifier.ts create mode 100644 solana-verifier/scripts/groth16/errors/index.ts create mode 100644 solana-verifier/scripts/groth16/index.ts create mode 100644 solana-verifier/scripts/groth16/instructions/index.ts create mode 100644 solana-verifier/scripts/groth16/instructions/verify.ts create mode 100644 solana-verifier/scripts/groth16/programs/groth16Verifier.ts create mode 100644 solana-verifier/scripts/groth16/programs/index.ts create mode 100644 solana-verifier/scripts/groth16/shared/index.ts create mode 100644 solana-verifier/scripts/loaderV3/index.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/close.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/deployWithMaxDataLen.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/extendProgram.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/index.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/initializeBuffer.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/setAuthority.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/setAuthorityChecked.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/upgrade.ts create mode 100644 solana-verifier/scripts/loaderV3/instructions/write.ts create mode 100644 solana-verifier/scripts/loaderV3/programs/index.ts create mode 100644 solana-verifier/scripts/loaderV3/programs/solanaLoaderV3Program.ts create mode 100644 solana-verifier/scripts/loaderV3/shared/index.ts create mode 100644 solana-verifier/scripts/loaderV4/index.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/deploy.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/finalize.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/index.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/retract.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/truncate.ts create mode 100644 solana-verifier/scripts/loaderV4/instructions/write.ts create mode 100644 solana-verifier/scripts/loaderV4/programs/index.ts create mode 100644 solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts create mode 100644 solana-verifier/scripts/loaderV4/shared/index.ts create mode 100644 solana-verifier/scripts/utils.ts create mode 100644 solana-verifier/scripts/verify-router/accounts/index.ts create mode 100644 solana-verifier/scripts/verify-router/accounts/verifierEntry.ts create mode 100644 solana-verifier/scripts/verify-router/accounts/verifierRouter.ts create mode 100644 solana-verifier/scripts/verify-router/errors/index.ts create mode 100644 solana-verifier/scripts/verify-router/errors/verifierRouter.ts create mode 100644 solana-verifier/scripts/verify-router/index.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/acceptOwnership.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/addVerifier.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/cancelTransfer.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/emergencyStop.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/index.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/initialize.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/renounceOwnership.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/transferOwnership.ts create mode 100644 solana-verifier/scripts/verify-router/instructions/verify.ts create mode 100644 solana-verifier/scripts/verify-router/programs/index.ts create mode 100644 solana-verifier/scripts/verify-router/programs/verifierRouter.ts create mode 100644 solana-verifier/scripts/verify-router/shared/index.ts create mode 100644 solana-verifier/scripts/verify-router/types/emergencyStopEvent.ts create mode 100644 solana-verifier/scripts/verify-router/types/index.ts create mode 100644 solana-verifier/scripts/verify-router/types/ownership.ts create mode 100644 solana-verifier/scripts/verify-router/types/proof.ts create mode 100644 solana-verifier/tests/new-tests.ts create mode 100644 solana-verifier/tsconfig.json create mode 100644 solana-verifier/yarn.lock delete mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore index 5497d8e..200d824 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,2 @@ -/target/ -Cargo.lock -**/*.rs.bk - -# VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# IntelliJ IDEA files -.idea/ -*.iml - -# macOS -.DS_Store - -# Windows -Thumbs.db -ehthumbs.db -Desktop.ini - -# Environments -.env -.env.local -.env.development.local -.env.test.local -.env.production.local - -# bun -bun.lockb -node_modules/ - -test-ledger/ \ No newline at end of file +*/test_ledger/* +*/target/* diff --git a/examples/hello_example/README.md b/examples/hello_example/README.md deleted file mode 100644 index 49b5d82..0000000 --- a/examples/hello_example/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# Hello Example - -This is an e2e example, containing a a RISC Zero zkVM guest, host, and a Solana Program. The guest produces a proof that is prepared, exported, and verified within a Solana program using the `risc0-solana` library. - -## Getting Started - -The steps below will guide you through setting up a Solana, deploying and testing, and general configuration. These instructions will likely change as the library and process mature. - -### Solana Setup - -Download Solana: -``` -sh -c "$(curl -sSfL https://release.solana.com/stable/install)" -``` - -Initialize the library and test-validator version. - -Note: this must match the version defined in the project (i.e. `1.18.20`). - -``` -solana-install init -``` - -For a fresh installation, you are required to generate a new keypair. - -``` -solana-keygen new -``` - -Set the keypair path: - -``` -solana config set --keypair -``` - -Now that Solana is installed, we can spin up a local node or connect to the devnet. - -For local testing, configure Solana to connect to `localhost` - -``` -solana config set --url localhost -``` - -To test on the devnet, configure Solana to the correct API. - -``` -solana config set --url localhost -``` - -To run a local test node, open a new terminal instance and run: - -``` -solana-test-validator -``` - -In order to log the network, we can simply run: - -``` -solana logs -``` - -### Program - -The program is defined in the `src/lib.rs` file, along with some example data in the `data` directory. - -To interact with the compile, deploy, test, you can utilize the bun scripts from inside `./program`. - - -``` -bun run clean:program // Cleans the build dir -bun run test:program // Test the program with BPF -bun run build:program // Builds the program with BPF -bun run deploy:program // Deploys the program -``` - -> To install bun, see https://bun.sh/docs/installation - -If you'd like to interact with the deployed Solana program (locally), use the `main.ts` script, which initializes the verification keys and verifies a proof, onchain. - -You can run this script with: - -``` -bun run start -``` - - -### zkVM - -The guest is the default template example. The host is configured to use Bonsai and the STARK2SNARK pipeline to produce a proof. We export this receipt to a file to be used in some of the tests. - -You can run the zkVM program from the root by running: - -``` -BONSAI_API_KEY= BONSAI_API_URL= cargo run -p host -``` - -This will write a receipt to the test directory. Carefully inspect the tests to understand the necessary pre-processing and compression steps to verify this receipt onchain. diff --git a/examples/hello_example/host/Cargo.toml b/examples/hello_example/host/Cargo.toml deleted file mode 100644 index 041a9b9..0000000 --- a/examples/hello_example/host/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "host" -version = "0.1.0" -edition = "2021" - -[dependencies] -methods = { path = "../methods" } -risc0-zkvm = { version = "1.1.1" } -tracing-subscriber = { version = "0.3", features = ["env-filter"] } -serde = "1.0" -serde_json = "1.0.121" - diff --git a/examples/hello_example/host/README.md b/examples/hello_example/host/README.md deleted file mode 100644 index 30404ce..0000000 --- a/examples/hello_example/host/README.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/examples/hello_example/host/src/main.rs b/examples/hello_example/host/src/main.rs deleted file mode 100644 index f2d3b2c..0000000 --- a/examples/hello_example/host/src/main.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -use std::{ - fs::{self, File}, - io::Write, - path::Path, -}; - -use methods::{EXAMPLE_ELF, EXAMPLE_ID}; -use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts, VerifierContext}; - -fn main() { - tracing_subscriber::fmt() - .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) - .init(); - - let input: u32 = 15 * u32::pow(2, 27) + 1; - let env = ExecutorEnv::builder() - .write(&input) - .expect("Failed to write input") - .build() - .expect("Failed to build ExecutorEnv"); - - let receipt = default_prover() - .prove_with_ctx( - env, - &VerifierContext::default(), - EXAMPLE_ELF, - &ProverOpts::groth16(), - ) - .expect("failed to prove.") - .receipt; - - let receipt_json = serde_json::to_vec(&receipt).unwrap(); - - let dir_path = &format!( - "{}/../../../test/data/receipt.json", - env!("CARGO_MANIFEST_DIR") - ); - if !Path::new(dir_path).exists() { - fs::create_dir_all(dir_path).unwrap(); - } - - let mut file = File::create(dir_path).unwrap(); - - // Write the data - file.write_all(&receipt_json).unwrap(); - - let _output: u32 = receipt.journal.decode().expect("failed to decode"); - - receipt.verify(EXAMPLE_ID).unwrap(); -} diff --git a/examples/hello_example/methods/build.rs b/examples/hello_example/methods/build.rs deleted file mode 100644 index a4aa256..0000000 --- a/examples/hello_example/methods/build.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -fn main() { - risc0_build::embed_methods(); -} diff --git a/examples/hello_example/methods/guest/src/main.rs b/examples/hello_example/methods/guest/src/main.rs deleted file mode 100644 index b0c5a6d..0000000 --- a/examples/hello_example/methods/guest/src/main.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -use risc0_zkvm::guest::env; - -fn main() { - let input: u32 = env::read(); - - env::commit(&input); -} diff --git a/examples/hello_example/methods/src/lib.rs b/examples/hello_example/methods/src/lib.rs deleted file mode 100644 index ae9d61e..0000000 --- a/examples/hello_example/methods/src/lib.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -include!(concat!(env!("OUT_DIR"), "/methods.rs")); diff --git a/examples/hello_example/program/Cargo.toml b/examples/hello_example/program/Cargo.toml deleted file mode 100644 index 496bcc2..0000000 --- a/examples/hello_example/program/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "program" -version = "0.1.0" -edition = "2021" - -[dependencies] -solana-program = "=1.18.20" -risc0-solana = { path = "../../.." } -borsh = { version = "1.5.1", features = ["derive"] } - -[dev-dependencies] -ark-std = "0.4.0" -array-bytes = "6.2.2" -serde = "1.0.195" -serde_json = "1.0.111" -risc0-zkvm = { version = "1.1.1", default-features = false } - - -[lib] -crate-type = ["cdylib", "lib"] diff --git a/examples/hello_example/program/README.md b/examples/hello_example/program/README.md deleted file mode 100644 index 30404ce..0000000 --- a/examples/hello_example/program/README.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/examples/hello_example/program/main.ts b/examples/hello_example/program/main.ts deleted file mode 100644 index ecc7937..0000000 --- a/examples/hello_example/program/main.ts +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -import { - Keypair, - Connection, - LAMPORTS_PER_SOL, - TransactionInstruction, - Transaction, - sendAndConfirmTransaction, - ComputeBudgetProgram, - SystemProgram, - PublicKey, -} from "@solana/web3.js"; -import fs from "mz/fs"; -import path from "path"; - -const PROGRAM_KEYPAIR_PATH = path.resolve( - __dirname, - "../../../target/deploy/program-keypair.json" -); -const CONNECTION_URL = "http://127.0.0.1:8899"; -const COMPUTE_UNITS = 1400000; -const COMPRESSED_PROOF_PATH = path.resolve(__dirname, "../../../test/data/compressed_proof.bin"); -const CLAIM_DIGEST_PATH = path.resolve(__dirname, "../../../test/data/claim_digest.bin"); -enum InstructionType { - VerifyProof = 0, - GenPublicInputs = 1, -} - -function serializeInstruction(instruction: InstructionType): Buffer { - return Buffer.from([instruction]); -} - -async function initConnection(): Promise { - return new Connection(CONNECTION_URL, "confirmed"); -} - -async function loadProgramId(): Promise { - const secretKeyString = await fs.readFile(PROGRAM_KEYPAIR_PATH, { encoding: "utf8" }); - const secretKey = Uint8Array.from(JSON.parse(secretKeyString)); - const programKeypair = Keypair.fromSecretKey(secretKey); - return programKeypair.publicKey; -} - -async function createPayerAccount(connection: Connection): Promise { - const payerKeypair = Keypair.generate(); - const airdropRequest = await connection.requestAirdrop( - payerKeypair.publicKey, - LAMPORTS_PER_SOL - ); - await connection.confirmTransaction(airdropRequest); - return payerKeypair; -} - -async function verify_proof( - connection: Connection, - payer: Keypair, - programId: PublicKey -): Promise { - const publicInputsAccountKeypair = Keypair.generate(); - const space = 160; // 5 * 32 bytes for public inputs - const lamports = await connection.getMinimumBalanceForRentExemption(space); - - const createAccountInstruction = SystemProgram.createAccount({ - fromPubkey: payer.publicKey, - newAccountPubkey: publicInputsAccountKeypair.publicKey, - lamports, - space, - programId, - }); - - const claimDigest = await fs.readFile(CLAIM_DIGEST_PATH); - const compressedProof = await fs.readFile(COMPRESSED_PROOF_PATH); - - const instructionData = Buffer.concat([ - Buffer.from([0]), // Instruction index for GenAndVerify - claimDigest, - compressedProof - ]); - - const genAndVerifyInstruction = new TransactionInstruction({ - keys: [ - { pubkey: publicInputsAccountKeypair.publicKey, isSigner: false, isWritable: true }, - ], - programId, - data: instructionData, - }); - - const transaction = new Transaction().add( - createAccountInstruction, - genAndVerifyInstruction - ); - - try { - const signature = await sendAndConfirmTransaction(connection, transaction, [payer, publicInputsAccountKeypair], { - skipPreflight: true, - preflightCommitment: 'confirmed', - }); - console.log("Transaction signature:", signature); - console.log("Proof verified!"); - } catch (error) { - console.error("Error in generate and verify operation:", error); - throw error; - } -} - -async function main() { - console.log("Launching client..."); - const connection = await initConnection(); - const programId = await loadProgramId(); - const payer = await createPayerAccount(connection); - - console.log("--Pinging Program ", programId.toBase58()); - - try { - console.log("-- Verifying Proof"); - await verify_proof(connection, payer, programId); - } catch (error) { - console.error("Error in main execution:", error); - } -} - - - -main().then( - () => process.exit(), - (err) => { - console.error(err); - process.exit(-1); - } -); \ No newline at end of file diff --git a/examples/hello_example/program/package.json b/examples/hello_example/program/package.json deleted file mode 100644 index fa50334..0000000 --- a/examples/hello_example/program/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "sol-test", - "module": "index.ts", - "type": "module", - "scripts": { - "start": "bun run main.ts", - "build:program": "cargo build-sbf", - "test:program": "cargo test-sbf", - "deploy:program": "solana program deploy ../../../target/deploy/program.so", - "clean:program": "cargo clean" - }, - "devDependencies": { - "@types/node": "^22.0.2", - "bun-types": "latest" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "dependencies": { - "@dao-xyz/borsh": "^5.2.3", - "@solana/web3.js": "^1.93.2", - "mz": "^2.7.0" - } -} diff --git a/examples/hello_example/program/src/lib.rs b/examples/hello_example/program/src/lib.rs deleted file mode 100644 index 9a64426..0000000 --- a/examples/hello_example/program/src/lib.rs +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -use borsh::{BorshDeserialize, BorshSerialize}; -use risc0_solana::{public_inputs, verify_proof, Proof, VerificationKey}; -use solana_program::entrypoint::ProgramResult; -use solana_program::{ - account_info::AccountInfo, - alt_bn128::compression::prelude::{alt_bn128_g1_decompress, alt_bn128_g2_decompress}, - entrypoint, msg, - program_error::ProgramError, - pubkey::Pubkey, -}; -entrypoint!(process_instruction); - -#[derive(Debug)] -enum VerifierProgramError { - DecompressionFailure, - VerificationFailure, -} - -// From: https://github.com/risc0/risc0/blob/v1.1.1/risc0/circuit/recursion/src/control_id.rs#L47 -const ALLOWED_CONTROL_ROOT: &str = - "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; -const BN254_IDENTITY_CONTROL_ID: &str = - "4e160df1e119ac0e3d658755a9edf38c8feb307b34bc10b57f4538dbe122a005"; - -// From risc0-ethereum: https://github.com/risc0/risc0-ethereum/blob/main/contracts/src/groth16/Groth16Verifier.sol -const VERIFYING_KEY: VerificationKey = VerificationKey { - nr_pubinputs: 5, - vk_alpha_g1: [ - 45, 77, 154, 167, 227, 2, 217, 223, 65, 116, 157, 85, 7, 148, 157, 5, 219, 234, 51, 251, - 177, 108, 100, 59, 34, 245, 153, 162, 190, 109, 242, 226, 20, 190, 221, 80, 60, 55, 206, - 176, 97, 216, 236, 96, 32, 159, 227, 69, 206, 137, 131, 10, 25, 35, 3, 1, 240, 118, 202, - 255, 0, 77, 25, 38, - ], - vk_beta_g2: [ - 9, 103, 3, 47, 203, 247, 118, 209, 175, 201, 133, 248, 136, 119, 241, 130, 211, 132, 128, - 166, 83, 242, 222, 202, 169, 121, 76, 188, 59, 243, 6, 12, 14, 24, 120, 71, 173, 76, 121, - 131, 116, 208, 214, 115, 43, 245, 1, 132, 125, 214, 139, 192, 224, 113, 36, 30, 2, 19, 188, - 127, 193, 61, 183, 171, 48, 76, 251, 209, 224, 138, 112, 74, 153, 245, 232, 71, 217, 63, - 140, 60, 170, 253, 222, 196, 107, 122, 13, 55, 157, 166, 154, 77, 17, 35, 70, 167, 23, 57, - 193, 177, 164, 87, 168, 199, 49, 49, 35, 210, 77, 47, 145, 146, 248, 150, 183, 198, 62, - 234, 5, 169, 213, 127, 6, 84, 122, 208, 206, 200, - ], - vk_gamma_g2: [ - 25, 142, 147, 147, 146, 13, 72, 58, 114, 96, 191, 183, 49, 251, 93, 37, 241, 170, 73, 51, - 53, 169, 231, 18, 151, 228, 133, 183, 174, 243, 18, 194, 24, 0, 222, 239, 18, 31, 30, 118, - 66, 106, 0, 102, 94, 92, 68, 121, 103, 67, 34, 212, 247, 94, 218, 221, 70, 222, 189, 92, - 217, 146, 246, 237, 9, 6, 137, 208, 88, 95, 240, 117, 236, 158, 153, 173, 105, 12, 51, 149, - 188, 75, 49, 51, 112, 179, 142, 243, 85, 172, 218, 220, 209, 34, 151, 91, 18, 200, 94, 165, - 219, 140, 109, 235, 74, 171, 113, 128, 141, 203, 64, 143, 227, 209, 231, 105, 12, 67, 211, - 123, 76, 230, 204, 1, 102, 250, 125, 170, - ], - vk_delta_g2: [ - 3, 176, 60, 213, 239, 250, 149, 172, 155, 238, 148, 241, 245, 239, 144, 113, 87, 189, 164, - 129, 44, 207, 11, 76, 145, 244, 43, 182, 41, 248, 58, 28, 26, 160, 133, 255, 40, 23, 154, - 18, 217, 34, 219, 160, 84, 112, 87, 204, 170, 233, 75, 157, 105, 207, 170, 78, 96, 64, 31, - 234, 127, 62, 3, 51, 17, 12, 16, 19, 79, 32, 11, 25, 246, 73, 8, 70, 213, 24, 201, 174, - 168, 104, 54, 110, 251, 114, 40, 202, 92, 145, 210, 148, 13, 3, 7, 98, 30, 96, 243, 31, - 203, 247, 87, 232, 55, 232, 103, 23, 131, 24, 131, 45, 11, 45, 116, 213, 158, 47, 234, 28, - 113, 66, 223, 24, 125, 63, 198, 211, - ], - vk_ic: &[ - [ - 18, 172, 154, 37, 220, 213, 225, 168, 50, 169, 6, 26, 8, 44, 21, 221, 29, 97, 170, 156, - 77, 85, 53, 5, 115, 157, 15, 93, 101, 220, 59, 228, 2, 90, 167, 68, 88, 30, 190, 122, - 217, 23, 49, 145, 28, 137, 133, 105, 16, 111, 245, 162, 211, 15, 62, 238, 43, 35, 198, - 14, 233, 128, 172, 212, - ], - [ - 7, 7, 185, 32, 188, 151, 140, 2, 242, 146, 250, 226, 3, 110, 5, 123, 229, 66, 148, 17, - 76, 204, 60, 135, 105, 216, 131, 246, 136, 161, 66, 63, 46, 50, 160, 148, 183, 88, 149, - 84, 247, 188, 53, 123, 246, 52, 129, 172, 210, 213, 85, 85, 194, 3, 56, 55, 130, 164, - 101, 7, 135, 255, 102, 66, - ], - [ - 11, 202, 54, 226, 203, 230, 57, 75, 62, 36, 151, 81, 133, 63, 150, 21, 17, 1, 28, 113, - 72, 227, 54, 244, 253, 151, 70, 68, 133, 15, 195, 71, 46, 222, 124, 154, 207, 72, 207, - 58, 55, 41, 250, 61, 104, 113, 78, 42, 132, 53, 212, 250, 109, 184, 247, 244, 9, 193, - 83, 177, 252, 223, 155, 139, - ], - [ - 27, 138, 249, 153, 219, 251, 179, 146, 124, 9, 28, 194, 170, 242, 1, 228, 136, 203, - 172, 195, 226, 198, 182, 251, 90, 37, 249, 17, 46, 4, 242, 167, 43, 145, 162, 106, 169, - 46, 27, 111, 87, 34, 148, 159, 25, 42, 129, 200, 80, 213, 134, 216, 26, 96, 21, 127, - 62, 156, 240, 79, 103, 156, 204, 214, - ], - [ - 43, 95, 73, 78, 214, 116, 35, 91, 138, 193, 117, 11, 223, 213, 167, 97, 95, 0, 45, 74, - 29, 206, 254, 221, 208, 110, 218, 90, 7, 108, 205, 13, 47, 229, 32, 173, 32, 32, 170, - 185, 203, 186, 129, 127, 203, 185, 168, 99, 184, 167, 111, 248, 143, 20, 249, 18, 197, - 231, 22, 101, 178, 173, 94, 130, - ], - [ - 15, 28, 60, 13, 93, 157, 160, 250, 3, 102, 104, 67, 205, 228, 232, 46, 134, 155, 165, - 37, 47, 206, 60, 37, 213, 148, 3, 32, 177, 196, 212, 147, 33, 75, 252, 255, 116, 244, - 37, 246, 254, 140, 13, 7, 179, 7, 72, 45, 139, 200, 187, 47, 54, 8, 246, 130, 135, 170, - 1, 189, 11, 105, 232, 9, - ], - ], -}; - -#[derive(BorshSerialize, BorshDeserialize)] -struct Storage { - public_inputs: [[u8; 32]; 5], -} - -#[derive(Debug)] -enum Instruction { - VerifyProof, -} - -impl Instruction { - fn unpack(input: &[u8]) -> Result { - if input.is_empty() { - return Err(ProgramError::InvalidInstructionData); - } - match input[0] { - 0 => Ok(Instruction::VerifyProof), - _ => Err(ProgramError::InvalidInstructionData), - } - } -} - -impl From for ProgramError { - fn from(error: VerifierProgramError) -> Self { - ProgramError::Custom(error as u32) - } -} - -pub fn process_instruction( - _program_id: &Pubkey, - accounts: &[AccountInfo], - instruction_data: &[u8], -) -> ProgramResult { - let instruction = Instruction::unpack(instruction_data)?; - - match instruction { - Instruction::VerifyProof => verify(accounts, &instruction_data[1..]), - } -} - -fn verify(accounts: &[AccountInfo], data: &[u8]) -> ProgramResult { - if accounts.is_empty() { - return Err(ProgramError::NotEnoughAccountKeys); - } - - let public_inputs_account = &accounts[0]; - - // [claim_digest (32 bytes) | compressed_proof_a (32 bytes) | compressed_proof_b (64 bytes) | compressed_proof_c (32 bytes)] - if data.len() != 160 { - return Err(ProgramError::InvalidInstructionData); - } - - let claim_digest: [u8; 32] = data[..32] - .try_into() - .map_err(|_| ProgramError::InvalidInstructionData)?; - - let public_inputs = public_inputs( - claim_digest, - ALLOWED_CONTROL_ROOT, - BN254_IDENTITY_CONTROL_ID, - )?; - - let stored_public_inputs = Storage { - public_inputs: public_inputs.inputs, - }; - - borsh::to_writer( - &mut public_inputs_account.data.borrow_mut()[..], - &stored_public_inputs, - )?; - - // Extract and decompress proof components - let compressed_proof_a: &[u8; 32] = data[32..64] - .try_into() - .map_err(|_| ProgramError::InvalidInstructionData)?; - let compressed_proof_b: &[u8; 64] = data[64..128] - .try_into() - .map_err(|_| ProgramError::InvalidInstructionData)?; - let compressed_proof_c: &[u8; 32] = data[128..160] - .try_into() - .map_err(|_| ProgramError::InvalidInstructionData)?; - - let proof_a = alt_bn128_g1_decompress(compressed_proof_a) - .map_err(|_| VerifierProgramError::DecompressionFailure)?; - - let proof_b = alt_bn128_g2_decompress(compressed_proof_b) - .map_err(|_| VerifierProgramError::DecompressionFailure)?; - - let proof_c = alt_bn128_g1_decompress(compressed_proof_c) - .map_err(|_| VerifierProgramError::DecompressionFailure)?; - - let proof = Proof { - pi_a: proof_a, - pi_b: proof_b, - pi_c: proof_c, - }; - - verify_proof(&proof, &public_inputs, &VERIFYING_KEY).map_err(|e| { - msg!("Proof verification failed: {:?}", e); - VerifierProgramError::VerificationFailure - })?; - - msg!("Proof successfully verified."); - - Ok(()) -} - -#[cfg(test)] -mod tests { - use risc0_solana::client::{compress_g1_be, compress_g2_be, negate_g1}; - use risc0_solana::{public_inputs, verify_proof, Proof, PublicInputs, VerificationKey}; - use risc0_zkvm::sha::Digestible; - use risc0_zkvm::Receipt; - use solana_program::alt_bn128::compression::prelude::{ - alt_bn128_g1_decompress, alt_bn128_g2_decompress, - }; - - // Constants for test data - const ALLOWED_CONTROL_ROOT: &str = - "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; - const BN254_IDENTITY_CONTROL_ID: &str = - "4e160df1e119ac0e3d658755a9edf38c8feb307b34bc10b57f4538dbe122a005"; - - fn load_receipt_and_extract_data() -> (Proof, PublicInputs<5>) { - let receipt_json_str = include_bytes!("../../../../test/data/receipt.json"); - let receipt: Receipt = serde_json::from_slice(receipt_json_str).unwrap(); - - let claim_digest = receipt - .inner - .groth16() - .unwrap() - .claim - .digest() - .try_into() - .unwrap(); - let public_inputs = public_inputs( - claim_digest, - ALLOWED_CONTROL_ROOT, - BN254_IDENTITY_CONTROL_ID, - ) - .unwrap(); - - let proof_raw = &receipt.inner.groth16().unwrap().seal; - let mut proof = Proof { - pi_a: proof_raw[0..64].try_into().unwrap(), - pi_b: proof_raw[64..192].try_into().unwrap(), - pi_c: proof_raw[192..256].try_into().unwrap(), - }; - proof.pi_a = negate_g1(&proof.pi_a).unwrap(); - - (proof, public_inputs) - } - - fn load_verification_key() -> VerificationKey<'static> { - let vk_json_str = include_str!("../../../../test/data/r0_test_vk.json"); - serde_json::from_str(vk_json_str).unwrap() - } - - #[test] - fn test_verify_proof() { - let (proof, public_inputs) = load_receipt_and_extract_data(); - let vk = load_verification_key(); - let result = verify_proof(&proof, &public_inputs, &vk); - - // Assert that the verification is successful - assert!(result.is_ok(), "Proof verification failed"); - } - - #[test] - fn test_public_inputs_serialization() { - let (_, public_inputs) = load_receipt_and_extract_data(); - let serialized = serde_json::to_string(&public_inputs).unwrap(); - let deserialized: PublicInputs<5> = serde_json::from_str(&serialized).unwrap(); - - assert_eq!( - public_inputs, deserialized, - "Public inputs serialization roundtrip failed" - ); - } - - #[test] - fn test_proof_serialization() { - let (proof, _) = load_receipt_and_extract_data(); - let serialized = serde_json::to_string(&proof).unwrap(); - let deserialized: Proof = serde_json::from_str(&serialized).unwrap(); - - assert_eq!(proof, deserialized, "Proof serialization roundtrip failed"); - } - - #[test] - fn test_verification_key_serialization() { - let vk = load_verification_key(); - let serialized = serde_json::to_string(&vk).unwrap(); - let deserialized: VerificationKey = serde_json::from_str(&serialized).unwrap(); - - assert_eq!( - vk, deserialized, - "Verification key serialization roundtrip failed" - ); - } - - #[test] - fn test_compress_and_decompress_proof() { - let (proof, _) = load_receipt_and_extract_data(); - - let compressed_proof_a = compress_g1_be(&proof.pi_a); - let compressed_proof_b = compress_g2_be(&proof.pi_b); - let compressed_proof_c = compress_g1_be(&proof.pi_c); - - let decompressed_proof_a = alt_bn128_g1_decompress(&compressed_proof_a).unwrap(); - let decompressed_proof_b = alt_bn128_g2_decompress(&compressed_proof_b).unwrap(); - let decompressed_proof_c = alt_bn128_g1_decompress(&compressed_proof_c).unwrap(); - - assert_eq!( - proof.pi_a, decompressed_proof_a, - "Proof pi_a mismatch after decompression" - ); - assert_eq!( - proof.pi_b, decompressed_proof_b, - "Proof pi_b mismatch after decompression" - ); - assert_eq!( - proof.pi_c, decompressed_proof_c, - "Proof pi_c mismatch after decompression" - ); - } - - #[test] - fn test_negate_g1() { - let (proof, _) = load_receipt_and_extract_data(); - let negated_pi_a = negate_g1(&proof.pi_a).unwrap(); - let original_pi_a = negate_g1(&negated_pi_a).unwrap(); - - // Assert that double negation returns the original pi_a - assert_eq!( - proof.pi_a, original_pi_a, - "Double negation of G1 point failed" - ); - } -} diff --git a/examples/hello_example/program/tsconfig.json b/examples/hello_example/program/tsconfig.json deleted file mode 100644 index 7556e1d..0000000 --- a/examples/hello_example/program/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "lib": ["ESNext"], - "module": "esnext", - "target": "esnext", - "moduleResolution": "bundler", - "moduleDetection": "force", - "allowImportingTsExtensions": true, - "noEmit": true, - "composite": true, - "strict": true, - "downlevelIteration": true, - "skipLibCheck": true, - "jsx": "react-jsx", - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "allowJs": true, - "types": [ - "bun-types" // add Bun global - ] - } -} diff --git a/solana-examples/.gitignore b/solana-examples/.gitignore new file mode 100644 index 0000000..2e0446b --- /dev/null +++ b/solana-examples/.gitignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +**/*.rs.bk +node_modules +test-ledger +.yarn diff --git a/solana-examples/.prettierignore b/solana-examples/.prettierignore new file mode 100644 index 0000000..4142583 --- /dev/null +++ b/solana-examples/.prettierignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +node_modules +dist +build +test-ledger diff --git a/solana-examples/Anchor.toml b/solana-examples/Anchor.toml new file mode 100644 index 0000000..8cc43f9 --- /dev/null +++ b/solana-examples/Anchor.toml @@ -0,0 +1,18 @@ +[toolchain] + +[features] +resolution = true +skip-lint = false + +[programs.localnet] +solana_examples = "HRA9VM1DJNhzuLhPG8k9Gb97PYocXJbRuNtZhnRmLiKC" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock new file mode 100644 index 0000000..9bc17e1 --- /dev/null +++ b/solana-examples/Cargo.lock @@ -0,0 +1,2457 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" +dependencies = [ + "borsh-derive 1.5.3", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + +[[package]] +name = "cc" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +dependencies = [ + "jobserver", + "libc", + "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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[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 = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "docker-generate" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf673e0848ef09fa4aeeba78e681cf651c0c7d35f76ee38cec8e55bc32fa111" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "groth_16_verifier" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anyhow", + "ark-bn254", + "ark-serialize", + "borsh 1.5.3", + "hex", + "num-bigint", + "num-traits", + "risc0-zkp", + "serde", + "solana-program", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.1", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[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 = "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 = "libc" +version = "0.2.164" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[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 = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "methods" +version = "0.1.0" +dependencies = [ + "risc0-build", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[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 = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[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 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[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 = "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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror", +] + +[[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", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "risc0-binfmt" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" +dependencies = [ + "anyhow", + "borsh 1.5.3", + "elf", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "syn 2.0.87", + "tracing", +] + +[[package]] +name = "risc0-build" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc684382e24a8c91331040c33f1c789c755a5c1b0b8a32fefc1730ca36dd7072" +dependencies = [ + "anyhow", + "cargo_metadata", + "dirs", + "docker-generate", + "hex", + "risc0-binfmt", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "serde_json", + "tempfile", +] + +[[package]] +name = "risc0-core" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" +dependencies = [ + "bytemuck", + "rand_core 0.6.4", +] + +[[package]] +name = "risc0-zkp" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" +dependencies = [ + "anyhow", + "blake2", + "borsh 1.5.3", + "bytemuck", + "cfg-if", + "digest 0.10.7", + "hex", + "hex-literal", + "metal", + "paste", + "rand_core 0.6.4", + "risc0-core", + "risc0-zkvm-platform", + "serde", + "sha2 0.10.8", + "tracing", +] + +[[package]] +name = "risc0-zkvm-platform" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" +dependencies = [ + "stability", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.215" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +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.215" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "serde_json" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-examples" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "methods", + "verifier_router", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0c52f25d28a1b5af57d5de3802e49883f68792a343101a9daf9817d8dfffff" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7d0abca44a21c83305e8650341f67ccc919a1a9dd698ddafc86e78b74b9296" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.87", +] + +[[package]] +name = "solana-program" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a99c3bc26fda40f42db98494271bda4906b0d7ab55f3ea7755fa5f110f58b5" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2ac8d7ef471476164edb2ed105bcf26071835a15f0e74703929d4ec913676b" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.87", +] + +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.87", +] + +[[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.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[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-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "verifier_router" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "groth_16_verifier", + "ownable", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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.87", + "wasm-bindgen-shared", +] + +[[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.87", + "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 = "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 = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.87", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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.87", +] diff --git a/solana-examples/Cargo.toml b/solana-examples/Cargo.toml new file mode 100644 index 0000000..f397704 --- /dev/null +++ b/solana-examples/Cargo.toml @@ -0,0 +1,14 @@ +[workspace] +members = [ + "programs/*" +] +resolver = "2" + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/solana-examples/hello-world/.gitignore b/solana-examples/hello-world/.gitignore new file mode 100644 index 0000000..f4247e1 --- /dev/null +++ b/solana-examples/hello-world/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +Cargo.lock +methods/guest/Cargo.lock +target/ diff --git a/solana-examples/hello-world/Cargo.toml b/solana-examples/hello-world/Cargo.toml new file mode 100644 index 0000000..63b3854 --- /dev/null +++ b/solana-examples/hello-world/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +resolver = "2" +members = ["host", "methods"] + +# Always optimize; building and running the guest takes much longer without optimization. +[profile.dev] +opt-level = 3 + +[profile.release] +debug = 1 +lto = true diff --git a/solana-examples/hello-world/LICENSE b/solana-examples/hello-world/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/solana-examples/hello-world/LICENSE @@ -0,0 +1,201 @@ + 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 [yyyy] [name of copyright owner] + + 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/solana-examples/hello-world/README.md b/solana-examples/hello-world/README.md new file mode 100644 index 0000000..df70292 --- /dev/null +++ b/solana-examples/hello-world/README.md @@ -0,0 +1,111 @@ +# RISC Zero Rust Starter Template + +Welcome to the RISC Zero Rust Starter Template! This template is intended to +give you a starting point for building a project using the RISC Zero zkVM. +Throughout the template (including in this README), you'll find comments +labelled `TODO` in places where you'll need to make changes. To better +understand the concepts behind this template, check out the [zkVM +Overview][zkvm-overview]. + +## Quick Start + +First, make sure [rustup] is installed. The +[`rust-toolchain.toml`][rust-toolchain] file will be used by `cargo` to +automatically install the correct version. + +To build all methods and execute the method within the zkVM, run the following +command: + +```bash +cargo run +``` + +This is an empty template, and so there is no expected output (until you modify +the code). + +### Executing the Project Locally in Development Mode + +During development, faster iteration upon code changes can be achieved by leveraging [dev-mode], we strongly suggest activating it during your early development phase. Furthermore, you might want to get insights into the execution statistics of your project, and this can be achieved by specifying the environment variable `RUST_LOG="[executor]=info"` before running your project. + +Put together, the command to run your project in development mode while getting execution statistics is: + +```bash +RUST_LOG="[executor]=info" RISC0_DEV_MODE=1 cargo run +``` + +### Running Proofs Remotely on Bonsai + +_Note: The Bonsai proving service is still in early Alpha; an API key is +required for access. [Click here to request access][bonsai access]._ + +If you have access to the URL and API key to Bonsai you can run your proofs +remotely. To prove in Bonsai mode, invoke `cargo run` with two additional +environment variables: + +```bash +BONSAI_API_KEY="YOUR_API_KEY" BONSAI_API_URL="BONSAI_URL" cargo run +``` + +## How to Create a Project Based on This Template + +Search this template for the string `TODO`, and make the necessary changes to +implement the required feature described by the `TODO` comment. Some of these +changes will be complex, and so we have a number of instructional resources to +assist you in learning how to write your own code for the RISC Zero zkVM: + +- The [RISC Zero Developer Docs][dev-docs] is a great place to get started. +- Example projects are available in the [examples folder][examples] of + [`risc0`][risc0-repo] repository. +- Reference documentation is available at [https://docs.rs][docs.rs], including + [`risc0-zkvm`][risc0-zkvm], [`cargo-risczero`][cargo-risczero], + [`risc0-build`][risc0-build], and [others][crates]. + +## Directory Structure + +It is possible to organize the files for these components in various ways. +However, in this starter template we use a standard directory structure for zkVM +applications, which we think is a good starting point for your applications. + +```text +project_name +├── Cargo.toml +├── host +│ ├── Cargo.toml +│ └── src +│ └── main.rs <-- [Host code goes here] +└── methods + ├── Cargo.toml + ├── build.rs + ├── guest + │ ├── Cargo.toml + │ └── src + │ └── method_name.rs <-- [Guest code goes here] + └── src + └── lib.rs +``` + +## Video Tutorial + +For a walk-through of how to build with this template, check out this [excerpt +from our workshop at ZK HACK III][zkhack-iii]. + +## Questions, Feedback, and Collaborations + +We'd love to hear from you on [Discord][discord] or [Twitter][twitter]. + +[bonsai access]: https://bonsai.xyz/apply +[cargo-risczero]: https://docs.rs/cargo-risczero +[crates]: https://github.com/risc0/risc0/blob/main/README.md#rust-binaries +[dev-docs]: https://dev.risczero.com +[dev-mode]: https://dev.risczero.com/api/generating-proofs/dev-mode +[discord]: https://discord.gg/risczero +[docs.rs]: https://docs.rs/releases/search?query=risc0 +[examples]: https://github.com/risc0/risc0/tree/main/examples +[risc0-build]: https://docs.rs/risc0-build +[risc0-repo]: https://www.github.com/risc0/risc0 +[risc0-zkvm]: https://docs.rs/risc0-zkvm +[rust-toolchain]: rust-toolchain.toml +[rustup]: https://rustup.rs +[twitter]: https://twitter.com/risczero +[zkhack-iii]: https://www.youtube.com/watch?v=Yg_BGqj_6lg&list=PLcPzhUaCxlCgig7ofeARMPwQ8vbuD6hC5&index=5 +[zkvm-overview]: https://dev.risczero.com/zkvm diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml new file mode 100644 index 0000000..7833a5b --- /dev/null +++ b/solana-examples/hello-world/host/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "host" +version = "0.1.0" +edition = "2021" + +[dependencies] +methods = { path = "../methods" } +risc0-zkvm = { version = "1.1.3" } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +serde = "1.0" +# # solana-examples = { path = "../../programs/solana-examples"} +# # anchor-client = { version = "0.30.1" } +serde_json = "1.0.133" + +# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 +[patch.crates-io] +curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } diff --git a/solana-examples/hello-world/host/receipt.json b/solana-examples/hello-world/host/receipt.json new file mode 100644 index 0000000..9ceff1e --- /dev/null +++ b/solana-examples/hello-world/host/receipt.json @@ -0,0 +1,358 @@ +{ + "inner": { + "Groth16": { + "seal": [ + 33, + 172, + 220, + 128, + 50, + 141, + 222, + 67, + 47, + 88, + 252, + 173, + 175, + 66, + 162, + 62, + 206, + 117, + 104, + 215, + 46, + 76, + 221, + 87, + 9, + 99, + 73, + 230, + 53, + 50, + 172, + 10, + 20, + 116, + 126, + 105, + 254, + 96, + 120, + 51, + 126, + 211, + 107, + 156, + 71, + 198, + 39, + 56, + 23, + 102, + 155, + 117, + 35, + 180, + 183, + 127, + 89, + 69, + 223, + 207, + 252, + 172, + 12, + 155, + 24, + 166, + 244, + 166, + 90, + 125, + 206, + 243, + 210, + 141, + 213, + 36, + 156, + 129, + 77, + 232, + 134, + 0, + 83, + 247, + 3, + 250, + 192, + 122, + 49, + 28, + 251, + 204, + 146, + 239, + 1, + 106, + 47, + 99, + 53, + 236, + 213, + 220, + 204, + 236, + 238, + 184, + 76, + 198, + 8, + 34, + 84, + 37, + 30, + 73, + 33, + 105, + 227, + 246, + 254, + 108, + 138, + 187, + 240, + 198, + 170, + 116, + 134, + 29, + 32, + 147, + 61, + 122, + 239, + 96, + 40, + 61, + 180, + 139, + 112, + 156, + 87, + 122, + 223, + 28, + 233, + 107, + 16, + 196, + 167, + 219, + 44, + 134, + 52, + 137, + 33, + 232, + 69, + 166, + 70, + 32, + 2, + 146, + 78, + 52, + 70, + 183, + 19, + 18, + 176, + 21, + 45, + 22, + 93, + 71, + 199, + 191, + 131, + 228, + 97, + 219, + 216, + 99, + 205, + 155, + 158, + 202, + 187, + 92, + 180, + 229, + 213, + 211, + 46, + 26, + 167, + 9, + 106, + 218, + 243, + 105, + 91, + 121, + 12, + 88, + 83, + 247, + 1, + 222, + 125, + 200, + 224, + 183, + 255, + 65, + 21, + 130, + 120, + 88, + 97, + 11, + 163, + 67, + 170, + 62, + 31, + 35, + 239, + 228, + 133, + 99, + 185, + 76, + 185, + 202, + 113, + 118, + 75, + 39, + 8, + 90, + 34, + 111, + 134, + 49, + 163, + 60, + 17, + 64, + 116, + 170, + 115, + 210, + 30, + 44, + 159, + 69 + ], + "claim": { + "Value": { + "pre": { + "Value": { + "pc": 2103824, + "merkle_root": [ + 3008558704, + 1457383356, + 2793242498, + 288622768, + 665521633, + 1423012114, + 3129177026, + 3398154412 + ] + } + }, + "post": { + "Value": { + "pc": 0, + "merkle_root": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + }, + "exit_code": { + "Halted": 0 + }, + "input": { + "Pruned": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "output": { + "Value": { + "journal": { + "Value": [ + 15, + 0, + 0, + 0 + ] + }, + "assumptions": { + "Value": [] + } + } + } + } + }, + "verifier_parameters": [ + 1763163472, + 2876521993, + 3272685530, + 2018367509, + 394453731, + 2734973759, + 718893618, + 4111358395 + ] + } + }, + "journal": { + "bytes": [ + 15, + 0, + 0, + 0 + ] + }, + "metadata": { + "verifier_parameters": [ + 1763163472, + 2876521993, + 3272685530, + 2018367509, + 394453731, + 2734973759, + 718893618, + 4111358395 + ] + } +} \ No newline at end of file diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs new file mode 100644 index 0000000..10f27ce --- /dev/null +++ b/solana-examples/hello-world/host/src/main.rs @@ -0,0 +1,94 @@ +// These constants represent the RISC-V ELF and the image ID generated by risc0-build. +// The ELF is used for proving and the ID is used for verification. +use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; +use risc0_zkvm::{default_prover, sha::Digestible, ExecutorEnv, ProverOpts}; +use std::borrow::Borrow; +use std::fs::File; +use std::io::{self, Write}; +use std::rc::Rc; + +fn main() { + // Initialize tracing. In order to view logs, run `RUST_LOG=info cargo run` + tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) + .init(); + + print!("Please enter the current nonce: "); + io::stdout().flush().expect("Unable to access STDIO"); + + let mut buffer = String::new(); + + io::stdin() + .read_line(&mut buffer) + .expect("Unable to read stdin"); + + let nonce: u32 = buffer.trim().parse().expect("Unable to parse nonce value"); + + // An executor environment describes the configurations for the zkVM + // including program inputs. + // An default ExecutorEnv can be created like so: + // `let env = ExecutorEnv::builder().build().unwrap();` + // However, this `env` does not have any inputs. + // + // To add guest input to the executor environment, use + // ExecutorEnvBuilder::write(). + // To access this method, you'll need to use ExecutorEnv::builder(), which + // creates an ExecutorEnvBuilder. When you're done adding input, call + // ExecutorEnvBuilder::build(). + + // Increment the current nonce for our transaction to be accepted + let input: u32 = nonce + 1; + let env = ExecutorEnv::builder() + .write(&input) + .unwrap() + .build() + .unwrap(); + + // Obtain the default prover. + let prover = default_prover(); + + // extract the receipt. + let standard_prover = default_prover(); + let standard_proof = standard_prover.prove(env, HELLO_GUEST_ELF).unwrap(); + let standard_receipt = standard_proof.receipt; + + println!("Standard Receipt: {:?}", standard_receipt); + + let env = ExecutorEnv::builder() + .write(&input) + .unwrap() + .build() + .unwrap(); + + // Proof information by proving the specified ELF binary. + // This struct contains the receipt along with statistics about execution of the guest + let prover_options = ProverOpts::groth16(); + let prove_info = prover + .prove_with_opts(env, HELLO_GUEST_ELF, &prover_options) + .unwrap(); + + let receipt = prove_info.receipt; + + let receipt_json = + serde_json::to_string_pretty(&receipt).expect("Unable to generate JSON file from receipt."); + + let mut receipt_file = + File::create("receipt.json").expect("Was unable to open file for writing."); + receipt_file + .write_all(receipt_json.as_bytes()) + .expect("Unable to write json receipt data to file."); + + let verifier_params = receipt.inner.verifier_parameters(); + let verifieer_params_json = serde_json::to_string_pretty(&verifier_params) + .expect("Was unable to generate JSON file from verifier_params."); + + let mut verifier_file = File::create("vp.json").expect("Was unable to open file for writing."); + + verifier_file + .write_all(verifieer_params_json.as_bytes()) + .expect("Unable to write Json VP data to file"); + + // The receipt was verified at the end of proving, but the below code is an + // example of how someone else could verify this receipt. + receipt.verify(HELLO_GUEST_ID).unwrap(); +} diff --git a/examples/hello_example/methods/Cargo.toml b/solana-examples/hello-world/methods/Cargo.toml similarity index 78% rename from examples/hello_example/methods/Cargo.toml rename to solana-examples/hello-world/methods/Cargo.toml index 7c1509a..f22f763 100644 --- a/examples/hello_example/methods/Cargo.toml +++ b/solana-examples/hello-world/methods/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [build-dependencies] -risc0-build = { version = "1.1.1" } +risc0-build = { version = "1.1.3" } [package.metadata.risc0] methods = ["guest"] diff --git a/solana-examples/hello-world/methods/build.rs b/solana-examples/hello-world/methods/build.rs new file mode 100644 index 0000000..08a8a4e --- /dev/null +++ b/solana-examples/hello-world/methods/build.rs @@ -0,0 +1,3 @@ +fn main() { + risc0_build::embed_methods(); +} diff --git a/examples/hello_example/methods/guest/Cargo.toml b/solana-examples/hello-world/methods/guest/Cargo.toml similarity index 51% rename from examples/hello_example/methods/guest/Cargo.toml rename to solana-examples/hello-world/methods/guest/Cargo.toml index cb6b255..79e7b8c 100644 --- a/examples/hello_example/methods/guest/Cargo.toml +++ b/solana-examples/hello-world/methods/guest/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "example" +name = "hello_guest" version = "0.1.0" edition = "2021" [workspace] [dependencies] -risc0-zkvm = { version = "1.1.1", default-features = false, features = ['std'] } +risc0-zkvm = { version = "1.1.3", default-features = false, features = ['std'] } diff --git a/solana-examples/hello-world/methods/guest/src/main.rs b/solana-examples/hello-world/methods/guest/src/main.rs new file mode 100644 index 0000000..14b597f --- /dev/null +++ b/solana-examples/hello-world/methods/guest/src/main.rs @@ -0,0 +1,9 @@ +use risc0_zkvm::guest::env; + +fn main() { + // read the input + let input: u32 = env::read(); + + // write public output to the journal + env::commit(&input); +} diff --git a/solana-examples/hello-world/methods/src/lib.rs b/solana-examples/hello-world/methods/src/lib.rs new file mode 100644 index 0000000..1bdb308 --- /dev/null +++ b/solana-examples/hello-world/methods/src/lib.rs @@ -0,0 +1 @@ +include!(concat!(env!("OUT_DIR"), "/methods.rs")); diff --git a/solana-examples/hello-world/receipt.json b/solana-examples/hello-world/receipt.json new file mode 100644 index 0000000..740e6e3 --- /dev/null +++ b/solana-examples/hello-world/receipt.json @@ -0,0 +1,358 @@ +{ + "inner": { + "Groth16": { + "seal": [ + 46, + 108, + 62, + 69, + 129, + 2, + 38, + 170, + 178, + 242, + 175, + 27, + 228, + 203, + 244, + 11, + 105, + 253, + 2, + 159, + 39, + 94, + 39, + 47, + 6, + 100, + 58, + 184, + 206, + 183, + 174, + 125, + 47, + 182, + 92, + 99, + 224, + 169, + 181, + 186, + 36, + 131, + 148, + 47, + 187, + 55, + 140, + 94, + 215, + 73, + 121, + 203, + 42, + 162, + 180, + 235, + 111, + 214, + 249, + 182, + 22, + 7, + 150, + 186, + 40, + 102, + 203, + 44, + 248, + 159, + 174, + 190, + 114, + 120, + 55, + 238, + 180, + 114, + 178, + 111, + 144, + 163, + 67, + 157, + 8, + 103, + 37, + 248, + 188, + 89, + 91, + 153, + 144, + 13, + 46, + 161, + 30, + 106, + 9, + 215, + 93, + 11, + 48, + 154, + 128, + 10, + 196, + 81, + 213, + 119, + 123, + 190, + 222, + 68, + 114, + 78, + 52, + 195, + 148, + 37, + 114, + 72, + 249, + 117, + 83, + 16, + 204, + 140, + 4, + 241, + 121, + 231, + 88, + 2, + 227, + 108, + 147, + 221, + 122, + 248, + 130, + 249, + 40, + 127, + 163, + 153, + 178, + 196, + 56, + 158, + 124, + 227, + 68, + 73, + 211, + 78, + 0, + 92, + 134, + 252, + 1, + 116, + 185, + 185, + 217, + 2, + 233, + 129, + 126, + 175, + 66, + 234, + 112, + 33, + 143, + 131, + 138, + 172, + 245, + 0, + 106, + 164, + 79, + 138, + 42, + 188, + 93, + 69, + 29, + 144, + 100, + 73, + 21, + 172, + 3, + 20, + 142, + 135, + 216, + 205, + 30, + 146, + 179, + 114, + 154, + 181, + 106, + 251, + 111, + 33, + 198, + 92, + 10, + 218, + 157, + 113, + 97, + 124, + 169, + 147, + 9, + 128, + 178, + 7, + 46, + 28, + 120, + 50, + 84, + 253, + 74, + 96, + 13, + 4, + 84, + 226, + 241, + 59, + 63, + 184, + 61, + 217, + 70, + 37, + 219, + 233, + 137, + 69, + 12, + 226, + 0, + 51, + 19, + 132, + 4, + 178 + ], + "claim": { + "Value": { + "pre": { + "Value": { + "pc": 2103824, + "merkle_root": [ + 3008558704, + 1457383356, + 2793242498, + 288622768, + 665521633, + 1423012114, + 3129177026, + 3398154412 + ] + } + }, + "post": { + "Value": { + "pc": 0, + "merkle_root": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + }, + "exit_code": { + "Halted": 0 + }, + "input": { + "Pruned": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "output": { + "Value": { + "journal": { + "Value": [ + 1, + 0, + 0, + 0 + ] + }, + "assumptions": { + "Value": [] + } + } + } + } + }, + "verifier_parameters": [ + 1763163472, + 2876521993, + 3272685530, + 2018367509, + 394453731, + 2734973759, + 718893618, + 4111358395 + ] + } + }, + "journal": { + "bytes": [ + 1, + 0, + 0, + 0 + ] + }, + "metadata": { + "verifier_parameters": [ + 1763163472, + 2876521993, + 3272685530, + 2018367509, + 394453731, + 2734973759, + 718893618, + 4111358395 + ] + } +} \ No newline at end of file diff --git a/solana-examples/hello-world/rust-toolchain.toml b/solana-examples/hello-world/rust-toolchain.toml new file mode 100644 index 0000000..36614c3 --- /dev/null +++ b/solana-examples/hello-world/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "stable" +components = ["rustfmt", "rust-src"] +profile = "minimal" diff --git a/solana-examples/hello-world/vp.json b/solana-examples/hello-world/vp.json new file mode 100644 index 0000000..3ef2904 --- /dev/null +++ b/solana-examples/hello-world/vp.json @@ -0,0 +1,10 @@ +[ + 1763163472, + 2876521993, + 3272685530, + 2018367509, + 394453731, + 2734973759, + 718893618, + 4111358395 +] \ No newline at end of file diff --git a/solana-examples/migrations/deploy.ts b/solana-examples/migrations/deploy.ts new file mode 100644 index 0000000..82fb175 --- /dev/null +++ b/solana-examples/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/solana-examples/package-lock.json b/solana-examples/package-lock.json new file mode 100644 index 0000000..43f3551 --- /dev/null +++ b/solana-examples/package-lock.json @@ -0,0 +1,2094 @@ +{ + "name": "solana-examples", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "license": "ISC", + "dependencies": { + "@coral-xyz/anchor": "^0.30.1" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } + }, + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@coral-xyz/anchor": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz", + "integrity": "sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@coral-xyz/anchor-errors": "^0.30.1", + "@coral-xyz/borsh": "^0.30.1", + "@noble/hashes": "^1.3.1", + "@solana/web3.js": "^1.68.0", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@coral-xyz/anchor-errors": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz", + "integrity": "sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/@coral-xyz/borsh": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz", + "integrity": "sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "license": "MIT", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.95.4", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.4.tgz", + "integrity": "sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" + } + }, + "node_modules/@solana/web3.js/node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.8" + } + }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "license": "MIT" + }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "license": "MIT", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==", + "license": "MIT" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", + "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", + "license": "MIT", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.5.10" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.3.tgz", + "integrity": "sha512-EMS95CMJzdoSKoIiXo8pxKoL8DYxwIZXYlLmgPb8KUv794abpnLK6ynsCAWNliOjREKruYKdzbh76HHYUHX7nw==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", + "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", + "license": "LGPL-3.0-only", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/@types/ws": { + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/rpc-websockets/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superstruct": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz", + "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", + "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/solana-examples/package.json b/solana-examples/package.json new file mode 100644 index 0000000..bcaa654 --- /dev/null +++ b/solana-examples/package.json @@ -0,0 +1,21 @@ +{ + "license": "ISC", + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.30.1" + }, + "devDependencies": { + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^10.0.0", + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "typescript": "^4.3.5", + "prettier": "^2.6.2" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/solana-examples/programs/solana-examples/Cargo.toml b/solana-examples/programs/solana-examples/Cargo.toml new file mode 100644 index 0000000..326629f --- /dev/null +++ b/solana-examples/programs/solana-examples/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "solana-examples" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "solana_examples" + +[features] +default = [] +cpi = ["no-entrypoint"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +idl-build = ["anchor-lang/idl-build"] + +# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 +[patch.crates-io] +curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } + + +[dependencies] +anchor-lang = "0.30.1" +verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["cpi"] } +methods = { path = "../../hello-world/methods"} \ No newline at end of file diff --git a/solana-examples/programs/solana-examples/Xargo.toml b/solana-examples/programs/solana-examples/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/solana-examples/programs/solana-examples/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs new file mode 100644 index 0000000..309b7b6 --- /dev/null +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -0,0 +1,114 @@ +use anchor_lang::prelude::*; +use verifier_router::cpi::accounts::Verify; +use verifier_router::program::VerifierRouter; +use verifier_router::router::{Groth16Verifier, Proof, PublicInputs, VerificationKey}; +use verifier_router::state::VerifierEntry; + +declare_id!("HRA9VM1DJNhzuLhPG8k9Gb97PYocXJbRuNtZhnRmLiKC"); + +#[program] +pub mod solana_examples { + use super::*; + + pub fn initialize(ctx: Context, selector: u32) -> Result<()> { + ctx.accounts.program_data.selector = selector; + ctx.accounts.program_data.nonce = 0; + Ok(()) + } + + pub fn increment_nonce( + ctx: Context, + proof: Proof, + journal_nonce: u32, + imageId: [u8; 32], + ) -> Result<()> { + // TODO: Verify that the proof comes from the correct Image ID + require!( + journal_nonce == ctx.accounts.program_data.nonce + 1, + ExampleErrors::BadProof + ); + // TODO: Verify that the proof input is only one greater then the current nonce + // Create the CPI context for the router + let cpi_accounts = Verify { + router: ctx.accounts.router.to_account_info(), + verifier_entry: ctx.accounts.verifier_entry.to_account_info(), + verifier_program: ctx.accounts.groth16_verifier.to_account_info(), + system_program: ctx.accounts.system_program.to_account_info(), + }; + + // TODO: Calculate Journal Digest from nonce on chain + let journal_digest: [u8; 32] = [0; 32]; + + let cpi_ctx = CpiContext::new(ctx.accounts.router.to_account_info(), cpi_accounts); + + // Call verify through the router, which will then call the actual verifier + verifier_router::cpi::verify( + cpi_ctx, + proof, + ctx.accounts.program_data.selector, + imageId, + journal_digest, + )?; + + // Increment the nonce + ctx.accounts.program_data.nonce += 1; + + Ok(()) + } +} + +#[account] +pub struct ProgramData { + pub selector: u32, + pub nonce: u32, +} + +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account( + init, + payer = authority, + space = 8 + 4 + 4 // discriminator + selector + nonce + )] + pub program_data: Account<'info, ProgramData>, + + #[account(mut)] + pub authority: Signer<'info>, + + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +pub struct ProveRun<'info> { + #[account(mut)] + pub program_data: Account<'info, ProgramData>, + + // The router program that will route to the correct verifier + pub router: Program<'info, VerifierRouter>, + + // The PDA entry in the router that maps our selector to the actual verifier + #[account( + seeds = [ + b"verifier", + router.key().as_ref(), + &program_data.selector.to_le_bytes() + ], + bump, + seeds::program = verifier_router::ID, + )] + pub verifier_entry: Account<'info, VerifierEntry>, + + // The actual Groth16 verifier program that will verify the proof + #[account(constraint = groth16_verifier.key() == verifier_entry.verifier @ ExampleErrors::InvalidVerifier)] + pub groth16_verifier: Program<'info, Groth16Verifier>, + + pub system_program: Program<'info, System>, +} + +#[error_code] +pub enum ExampleErrors { + #[msg("Invalid verifier selected")] + InvalidVerifier, + #[msg("Bad Proof")] + BadProof, +} diff --git a/solana-examples/tests/solana-examples.ts b/solana-examples/tests/solana-examples.ts new file mode 100644 index 0000000..88b31c9 --- /dev/null +++ b/solana-examples/tests/solana-examples.ts @@ -0,0 +1,16 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { SolanaExamples } from "../target/types/solana_examples"; + +describe("solana-examples", () => { + // Configure the client to use the local cluster. + anchor.setProvider(anchor.AnchorProvider.env()); + + const program = anchor.workspace.SolanaExamples as Program; + + it("Is initialized!", async () => { + // Add your test here. + const tx = await program.methods.initialize().rpc(); + console.log("Your transaction signature", tx); + }); +}); diff --git a/solana-examples/tsconfig.json b/solana-examples/tsconfig.json new file mode 100644 index 0000000..cd5d2e3 --- /dev/null +++ b/solana-examples/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} diff --git a/solana-examples/yarn.lock b/solana-examples/yarn.lock new file mode 100644 index 0000000..b7d94b8 --- /dev/null +++ b/solana-examples/yarn.lock @@ -0,0 +1,1181 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.25.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + +"@coral-xyz/anchor-errors@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz" + integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== + +"@coral-xyz/anchor@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz" + integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== + dependencies: + "@coral-xyz/anchor-errors" "^0.30.1" + "@coral-xyz/borsh" "^0.30.1" + "@noble/hashes" "^1.3.1" + "@solana/web3.js" "^1.68.0" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + +"@coral-xyz/borsh@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz" + integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + +"@noble/curves@^1.4.2": + version "1.6.0" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz" + integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== + dependencies: + "@noble/hashes" "1.5.0" + +"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + +"@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/web3.js@^1.68.0": + version "1.95.4" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.4.tgz" + integrity sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + +"@swc/helpers@^0.5.11": + version "0.5.15" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz" + integrity sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g== + dependencies: + tslib "^2.8.0" + +"@types/bn.js@^5.1.0": + version "5.1.6" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== + dependencies: + "@types/node" "*" + +"@types/chai@^4.3.0": + version "4.3.20" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz" + integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== + +"@types/connect@^3.4.33": + version "3.4.38" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/mocha@^9.0.0": + version "9.1.1" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@types/node@*": + version "22.9.0" + resolved "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz" + integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== + dependencies: + undici-types "~6.19.8" + +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@types/ws@^8.2.2": + version "8.5.13" + resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz" + integrity sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA== + dependencies: + "@types/node" "*" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +agentkeepalive@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.10" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-layout@^1.2.0, buffer-layout@^1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" + integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== + +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bufferutil@^4.0.1: + version "4.0.8" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + +camelcase@^6.0.0, camelcase@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai@^4.3.4: + version "4.5.0" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.1.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + +crypto-hash@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" + integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== + +debug@4.3.3: + version "4.3.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +he@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +jayson@^4.1.1: + version "4.1.2" + resolved "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@^9.0.3: + version "9.2.2" + resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.3" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + growl "1.10.5" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" + ms "2.1.3" + nanoid "3.3.1" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + workerpool "6.2.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.0.0: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-fetch@^2.6.12, node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.3.0: + version "4.8.3" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.3.tgz" + integrity sha512-EMS95CMJzdoSKoIiXo8pxKoL8DYxwIZXYlLmgPb8KUv794abpnLK6ynsCAWNliOjREKruYKdzbh76HHYUHX7nw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +pako@^2.0.3: + version "2.1.0" + resolved "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prettier@^2.6.2: + version "2.8.8" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +source-map-support@^0.5.6: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +text-encoding-utf-8@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" + integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toml@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz" + integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +tsconfig-paths@^3.5.0: + version "3.15.0" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^2.0.3, tslib@^2.8.0: + version "2.8.1" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + +typescript@^4.3.5: + version "4.9.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +undici-types@~6.19.8: + version "6.19.8" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz" + integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/solana-ownable/.gitignore b/solana-ownable/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/solana-ownable/.gitignore @@ -0,0 +1 @@ +/target diff --git a/solana-ownable/Cargo.lock b/solana-ownable/Cargo.lock new file mode 100644 index 0000000..3cc86a4 --- /dev/null +++ b/solana-ownable/Cargo.lock @@ -0,0 +1,1898 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.85", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "jobserver", + "libc", + "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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[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 = "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 = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[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 = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[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 = "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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +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 = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-frozen-abi" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.85", +] + +[[package]] +name = "solana-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.1", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.85", +] + +[[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 = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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-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 = "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 = "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 = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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/solana-ownable/Cargo.toml b/solana-ownable/Cargo.toml new file mode 100644 index 0000000..7813637 --- /dev/null +++ b/solana-ownable/Cargo.toml @@ -0,0 +1,16 @@ +[workspace] +members = [ + "ownable-macro", + "ownable", +] + +resolver = "2" + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 \ No newline at end of file diff --git a/solana-ownable/ownable-macro/Cargo.toml b/solana-ownable/ownable-macro/Cargo.toml new file mode 100644 index 0000000..154cf10 --- /dev/null +++ b/solana-ownable/ownable-macro/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "ownable-macro" +version = "0.1.0" +edition = "2021" + +[lib] +proc-macro = true + +[dependencies] +proc-macro2 = "1.0.89" +quote = "1.0.37" +syn = { version = "2.0.85", features = ["full"] } diff --git a/solana-ownable/ownable-macro/src/lib.rs b/solana-ownable/ownable-macro/src/lib.rs new file mode 100644 index 0000000..533f6c4 --- /dev/null +++ b/solana-ownable/ownable-macro/src/lib.rs @@ -0,0 +1,198 @@ +//! Procedural macro implementation for the Ownable trait +//! +//! This module provides the derive macro implementation that generates the necessary +//! Anchor account structures and implementation methods for ownership management. +use proc_macro::TokenStream; +use quote::quote; +use syn::{parse_macro_input, DeriveInput}; + +/// Derives the Ownable trait for an Anchor account struct +/// +/// This proc macro generates the following for the decorated struct: +/// - Account validation structures for ownership management instructions +/// - Implementation of ownership transfer methods +/// - Integration with Anchor's Context system +/// +/// # Requirements +/// - The decorated struct must contain an `ownership: Ownership` field +/// - The struct must be an Anchor account (decorated with `#[account]`) +/// +/// # Generated Structures +/// For a struct named `MyAccount`, the following structures are generated: +/// - `MyAccountTransferOwnership` +/// - `MyAccountAcceptOwnership` +/// - `MyAccountRenounceOwnership` +/// - `MyAccountCancelTransfer` +/// +/// # Notice +/// You *MUST* expose the various methods for account management in your program/contract otherwise +/// you may not be able to transfer or accept ownership of your accounts. +/// +/// Each structure implements Anchor's `Accounts` trait for instruction validation. +/// +/// # Example +/// ```rust +/// #[account] +/// #[derive(Ownable)] +/// pub struct TestState { +/// pub ownership: Ownership, // Size is 66 bytes +/// pub data: u64, +/// } +/// +/// #[program] +/// pub mod test_program { +/// use super::*; +/// +/// pub fn initialize(ctx: Context) -> Result<()> { +/// ctx.accounts.state.ownership = Ownership::new(ctx.accounts.authority.key())?; +/// Ok(()) +/// } +/// +/// pub fn transfer_ownership( +/// ctx: Context, +/// new_owner: Pubkey, +/// ) -> Result<()> { +/// TestState::transfer_ownership(ctx, new_owner) +/// } +/// +/// pub fn accept_ownership(ctx: Context) -> Result<()> { +/// TestState::accept_ownership(ctx) +/// } +/// +/// pub fn renounce_ownership(ctx: Context) -> Result<()> { +/// TestState::renounce_ownership(ctx) +/// } +/// +/// pub fn cancel_transfer(ctx: Context) -> Result<()> { +/// TestState::cancel_transfer(ctx) +/// } +/// } +/// ``` +#[proc_macro_derive(Ownable)] +pub fn ownable_derive(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + let name = input.ident; + + // Generate unique identifiers for each account structure + // These will be used as the names for the Context types + let transfer_ownership_name = + syn::Ident::new(&format!("{}TransferOwnership", name), name.span()); + let accept_ownership_name = syn::Ident::new(&format!("{}AcceptOwnership", name), name.span()); + let renounce_ownership_name = + syn::Ident::new(&format!("{}RenounceOwnership", name), name.span()); + let cancel_transfer_name = syn::Ident::new(&format!("{}CancelTransfer", name), name.span()); + + let expanded = quote! { + /// Account validation for transferring ownership + /// + /// Verifies that: + /// - The state account is mutable + /// - The authority (signer) is mutable and has signed the transaction + #[derive(Accounts)] + pub struct #transfer_ownership_name<'info> { + #[account(mut)] + pub state: Account<'info, #name>, + #[account(mut)] + pub authority: Signer<'info>, + } + + /// Account validation for accepting ownership + /// + /// Verifies that: + /// - The state account is mutable + /// - The authority (signer) is mutable and has signed the transaction + #[derive(Accounts)] + pub struct #accept_ownership_name<'info> { + #[account(mut)] + pub state: Account<'info, #name>, + #[account(mut)] + pub authority: Signer<'info>, + } + + /// Account validation for renouncing ownership + /// + /// Verifies that: + /// - The state account is mutable + /// - The authority (signer) is mutable and has signed the transaction + #[derive(Accounts)] + pub struct #renounce_ownership_name<'info> { + #[account(mut)] + pub state: Account<'info, #name>, + #[account(mut)] + pub authority: Signer<'info>, + } + + /// Account validation for canceling an ownership transfer + /// + /// Verifies that: + /// - The state account is mutable + /// - The authority (signer) is mutable and has signed the transaction + #[derive(Accounts)] + pub struct #cancel_transfer_name<'info> { + #[account(mut)] + pub state: Account<'info, #name>, + #[account(mut)] + pub authority: Signer<'info>, + } + + // Implementation of ownership methods from autogenerated anchor contexts + impl #name { + /// Initiates the transfer of ownership to a new address + /// + /// # Arguments + /// * `ctx` - Anchor Context containing the account and authority + /// * `new_owner` - Public key of the proposed new owner + /// + /// # Returns + /// * `Ok(())` if the transfer is initiated successfully + /// * `Err` if the operation fails (see `OwnableError` for possible errors) + pub fn transfer_ownership( + ctx: Context<#transfer_ownership_name>, + new_owner: Pubkey + ) -> Result<()> { + ctx.accounts.state.ownership.transfer_ownership( + new_owner, + &ctx.accounts.authority + ) + } + + /// Accepts a pending ownership transfer + /// + /// # Arguments + /// * `ctx` - Anchor Context containing the account and authority + /// + /// # Returns + /// * `Ok(())` if ownership is transferred successfully + /// * `Err` if the operation fails (see `OwnableError` for possible errors) + pub fn accept_ownership(ctx: Context<#accept_ownership_name>) -> Result<()> { + ctx.accounts.state.ownership.accept_ownership(&ctx.accounts.authority) + } + + /// Permanently removes owner privileges + /// + /// # Arguments + /// * `ctx` - Anchor Context containing the account and authority + /// + /// # Returns + /// * `Ok(())` if ownership is successfully renounced + /// * `Err` if the operation fails (see `OwnableError` for possible errors) + pub fn renounce_ownership(ctx: Context<#renounce_ownership_name>) -> Result<()> { + ctx.accounts.state.ownership.renounce_ownership(&ctx.accounts.authority) + } + + /// Cancels a pending ownership transfer + /// + /// # Arguments + /// * `ctx` - Anchor Context containing the account and authority + /// + /// # Returns + /// * `Ok(())` if the transfer is successfully canceled + /// * `Err` if the operation fails (see `OwnableError` for possible errors) + pub fn cancel_transfer(ctx: Context<#cancel_transfer_name>) -> Result<()> { + ctx.accounts.state.ownership.cancel_transfer(&ctx.accounts.authority) + } + } + }; + + TokenStream::from(expanded) +} diff --git a/solana-ownable/ownable/Cargo.lock b/solana-ownable/ownable/Cargo.lock new file mode 100644 index 0000000..b53f85c --- /dev/null +++ b/solana-ownable/ownable/Cargo.lock @@ -0,0 +1,2224 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program 1.18.26", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.85", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "jobserver", + "libc", + "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 = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "num-traits", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.85", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.8", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +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 = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[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 = "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 = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[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 = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", + "solana-program 2.0.14", + "solana-sdk", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[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 = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +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_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-frozen-abi" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.85", +] + +[[package]] +name = "solana-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.1", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools 0.10.5", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro 1.18.26", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2625a23c3813b620141ee447819b08d1b9a5f1c69a309754834e3f35798a21fb" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.22.1", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.4", + "borsh 1.5.1", + "bs58 0.5.1", + "bv", + "bytemuck", + "bytemuck_derive", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "sha3", + "solana-sdk-macro 2.0.14", + "thiserror", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bec7d84513d65700740755c512a0d58b9f60dbbce683379c399d2c357b3ceb0" +dependencies = [ + "bincode", + "bitflags", + "borsh 1.5.1", + "bs58 0.5.1", + "bytemuck", + "bytemuck_derive", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "getrandom 0.1.16", + "hmac 0.12.1", + "itertools 0.12.1", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num_enum", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.8", + "sha3", + "siphasher", + "solana-program 2.0.14", + "solana-sdk-macro 2.0.14", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.85", +] + +[[package]] +name = "solana-sdk-macro" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93a5a1eabc890415d326707afe62cd7a2009236e8d899c1519566fc8f7e3977b" +dependencies = [ + "bs58 0.5.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.85", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[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 = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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-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 = "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 = "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 = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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/solana-ownable/ownable/Cargo.toml b/solana-ownable/ownable/Cargo.toml new file mode 100644 index 0000000..961ba2f --- /dev/null +++ b/solana-ownable/ownable/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "ownable" +version = "0.1.0" +edition = "2021" + +[dependencies] +anchor-lang = { version = "0.30.1", features = ["init-if-needed" ] } +ownable-macro = { version = "0.1.0", path = "../ownable-macro" } diff --git a/solana-ownable/ownable/src/lib.rs b/solana-ownable/ownable/src/lib.rs new file mode 100644 index 0000000..9ce5515 --- /dev/null +++ b/solana-ownable/ownable/src/lib.rs @@ -0,0 +1,226 @@ +//! Ownable Library for Anchor programs +//! +//! This crate provides a derivable trait for implementing two-step ownership transfers +//! for accounts in Solana programs built with the Anchor framework. It follows similar patterns to +//! Solidity's Ownable2Step contract while leveraging Anchor's account system. +//! +//! # Overview +//! The framework generates boilerplate code for creating accounts that can be owned +//! and transferred in a secure two-step process. It's implemented as a proc macro +//! to minimize additional account creation overhead. +//! +//! # Required Methods +//! Programs using this trait must expose the following methods for each account type that is ownable: +//! * `transfer_ownership` - Initiates ownership transfer +//! * `accept_ownership` - Completes ownership transfer +//! * `renounce_ownership` - Permanently remove the owner +//! * `cancel_transfer` - Cancels a pending transfer +//! +//! # Examples +//! ```rust +//! #[account] +//! #[derive(Ownable)] +//! pub struct TestState { +//! pub ownership: Ownership, // Size is 66 bytes +//! pub data: u64, +//! } +//! ``` +use anchor_lang::prelude::*; +pub use ownable_macro::Ownable; + +#[error_code] +pub enum OwnableError { + /// This error occurs when a privileged operation is attempted by any account + /// other than the verified owner. + #[msg("Not the current owner")] + NotOwner, + + /// This error occurs when the owner of a contract attempts to inititate a transfer + /// to themselves. + #[msg("Cannot transfer ownership to yourself")] + CannotTransferToSelf, + + /// This error occurs when trying to accept or cancel a transfer that hasn't + /// been initiated. + #[msg("No pending ownership transfer")] + NoPendingTransfer, + + /// This error occurs when an account other than the designated pending owner + /// attempts to accept ownership. + #[msg("Only the account with a valid pending claim can claim ownership")] + NotPendingOwner, + + /// This error occurs when the cancel operation is attempted by an account + /// that is neither the current owner nor the pending owner. + #[msg("Action can only be submitted by a pending owner or actual owner")] + NotOwnerOrPendingOwner, + + /// This error occurs when attempting to transfer ownership to the default public key + #[msg("Cannot transfer ownership to the zero address")] + InvalidAddress, +} + +/// This structure tracks both the current owner and any pending ownership transfers. +/// It's designed to be embedded within Anchor accounts that need ownership functionality. +/// This structure is 66 bytes in size. +/// +/// # Example +/// ```rust +/// #[account] +/// #[derive(Ownable)] +/// pub struct TestState { +/// pub ownership: Ownership, +/// pub data: u64, +/// } +/// ``` +#[derive(AnchorSerialize, AnchorDeserialize, Clone, Default)] +pub struct Ownership { + /// The current owner's public key + owner: Option, + /// The public key of the pending owner during a transfer, if any + pending_owner: Option, +} + +impl Ownership { + /// Creates a new Ownership instance with a specified initial owner + /// + /// # Arguments + /// * `owner` - The public key to set as the initial owner + /// + /// # Returns + /// * `Ok(Ownership)` with the specified owner and no pending transfer + /// * `Err(OwnableError::InvalidAddress)` if the owner is the zero address + pub fn new(owner: Pubkey) -> Result { + require!(owner != Pubkey::default(), OwnableError::InvalidAddress); + Ok(Self { + owner: Some(owner), + pending_owner: None, + }) + } + + /// Verifies that the provided signer is the current owner + /// + /// # Arguments + /// * `authority` - An Anchor Signer type representing the account attempting the operation. + /// Anchor verifies that this account signed the transaction. + /// + /// # Returns + /// * `Ok(())` if the signer matches the current owner + /// * `Err(OwnableError::NotOwner)` if verification fails + pub fn assert_owner(&self, authority: &Signer) -> Result<()> { + require!(self.owner == Some(authority.key()), OwnableError::NotOwner); + Ok(()) + } + + /// Internal method that verifies that the provided signer is the pending owner + /// + /// # Arguments + /// * `authority` - An Anchor Signer type representing the account attempting the operation. + /// Anchor verifies that this account signed the transaction. + /// + /// # Returns + /// * `Ok(())` if the signer matches the pending owner + /// * `Err(OwnableError::NoPendingTransfer)` if no transfer is in progress + /// * `Err(OwnableError::NotPendingOwner)` if the signer is not the pending owner + fn assert_pending_owner(&self, authority: &Signer) -> Result<()> { + require!( + self.pending_owner.is_some(), + OwnableError::NoPendingTransfer + ); + require!( + Some(authority.key()) == self.pending_owner, + OwnableError::NotPendingOwner + ); + Ok(()) + } + + /// Initiates an ownership transfer to a new address + /// + /// # Arguments + /// * `new_owner` - The public key of the proposed new owner + /// * `authority` - An Anchor Signer type representing the current owner's account. + /// Anchor verifies that this account signed the transaction. + /// + /// # Returns + /// * `Ok(())` if the transfer is initiated + /// * `Err(OwnableError::NotOwner)` if the signer is not the current owner + /// * `Err(OwnableError::InvalidAddress)` if attempting to transfer to the zero address + pub fn transfer_ownership(&mut self, new_owner: Pubkey, authority: &Signer) -> Result<()> { + self.assert_owner(authority)?; + require!( + new_owner != authority.key(), + OwnableError::CannotTransferToSelf + ); + require!(new_owner != Pubkey::default(), OwnableError::InvalidAddress); + self.pending_owner = Some(new_owner); + Ok(()) + } + + /// Completes a pending ownership transfer + /// + /// The pending owner must call this method to accept the transfer and become + /// the new owner. This two-step process helps prevent accidental transfers + /// to incorrect addresses. + /// + /// # Arguments + /// * `authority` - An Anchor Signer type representing the pending owner's account. + /// Anchor verifies that this account signed the transaction. + /// + /// # Returns + /// * `Ok(())` if ownership is transferred successfully + /// * `Err(OwnableError::NoPendingTransfer)` if no transfer is in progress + /// * `Err(OwnableError::NotPendingOwner)` if the signer is not the pending owner + pub fn accept_ownership(&mut self, authority: &Signer) -> Result<()> { + self.assert_pending_owner(authority)?; + self.owner = Some(authority.key()); + self.pending_owner = None; + Ok(()) + } + + /// Permanently removes owner privileges by setting owner to None + /// + /// # Warning + /// This action is irreversible. Once ownership is renounced, no new owner can + /// be set and privileged operations become permanently inaccessible. + /// + /// # Arguments + /// * `authority` - An Anchor Signer type representing the current owner's account. + /// Anchor verifies that this account signed the transaction. + /// + /// # Returns + /// * `Ok(())` if ownership is successfully renounced + /// * `Err(OwnableError::NotOwner)` if the signer is not the current owner + pub fn renounce_ownership(&mut self, authority: &Signer) -> Result<()> { + self.assert_owner(authority)?; + self.owner = None; + self.pending_owner = None; + Ok(()) + } + + /// Cancels a pending ownership transfer + /// + /// This method can be called by either the current owner or the pending owner + /// to cancel an in-progress ownership transfer. + /// + /// # Arguments + /// * `authority` - An Anchor Signer type representing either the current owner's + /// or pending owner's account. Anchor verifies that this account + /// signed the transaction. + /// + /// # Returns + /// * `Ok(())` if the transfer is successfully canceled + /// * `Err(OwnableError::NoPendingTransfer)` if no transfer is in progress + /// * `Err(OwnableError::NotOwnerOrPendingOwner)` if the signer is neither the + /// current owner nor the pending owner + pub fn cancel_transfer(&mut self, authority: &Signer) -> Result<()> { + require!( + self.pending_owner.is_some(), + OwnableError::NoPendingTransfer + ); + self.assert_owner(authority) + .or_else(|_| self.assert_pending_owner(authority)) + .map_err(|_| OwnableError::NotOwnerOrPendingOwner)?; + self.pending_owner = None; + Ok(()) + } +} diff --git a/solana-ownable/test-program/.gitignore b/solana-ownable/test-program/.gitignore new file mode 100644 index 0000000..2e0446b --- /dev/null +++ b/solana-ownable/test-program/.gitignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +**/*.rs.bk +node_modules +test-ledger +.yarn diff --git a/solana-ownable/test-program/.prettierignore b/solana-ownable/test-program/.prettierignore new file mode 100644 index 0000000..4142583 --- /dev/null +++ b/solana-ownable/test-program/.prettierignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +node_modules +dist +build +test-ledger diff --git a/solana-ownable/test-program/Anchor.toml b/solana-ownable/test-program/Anchor.toml new file mode 100644 index 0000000..77b7ae7 --- /dev/null +++ b/solana-ownable/test-program/Anchor.toml @@ -0,0 +1,18 @@ +[toolchain] + +[features] +resolution = true +skip-lint = false + +[programs.localnet] +test_program = "6K98qo8BZznst27ieMaCmTNZU7ryExBPgCKndZic8z5d" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/solana-ownable/test-program/Cargo.lock b/solana-ownable/test-program/Cargo.lock new file mode 100644 index 0000000..de199ce --- /dev/null +++ b/solana-ownable/test-program/Cargo.lock @@ -0,0 +1,1990 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.85", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "jobserver", + "libc", + "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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[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 = "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 = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[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 = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[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 = "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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.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", + "regex-syntax", +] + +[[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", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +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_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-frozen-abi" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.85", +] + +[[package]] +name = "solana-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.1", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.85", +] + +[[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 = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "test-program" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "inventory", + "ownable", +] + +[[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 = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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-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 = "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 = "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 = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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/solana-ownable/test-program/Cargo.toml b/solana-ownable/test-program/Cargo.toml new file mode 100644 index 0000000..f397704 --- /dev/null +++ b/solana-ownable/test-program/Cargo.toml @@ -0,0 +1,14 @@ +[workspace] +members = [ + "programs/*" +] +resolver = "2" + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/solana-ownable/test-program/migrations/deploy.ts b/solana-ownable/test-program/migrations/deploy.ts new file mode 100644 index 0000000..82fb175 --- /dev/null +++ b/solana-ownable/test-program/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/solana-ownable/test-program/package.json b/solana-ownable/test-program/package.json new file mode 100644 index 0000000..bcaa654 --- /dev/null +++ b/solana-ownable/test-program/package.json @@ -0,0 +1,21 @@ +{ + "license": "ISC", + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.30.1" + }, + "devDependencies": { + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^10.0.0", + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "typescript": "^4.3.5", + "prettier": "^2.6.2" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/solana-ownable/test-program/programs/test-program/Cargo.toml b/solana-ownable/test-program/programs/test-program/Cargo.toml new file mode 100644 index 0000000..6730d37 --- /dev/null +++ b/solana-ownable/test-program/programs/test-program/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "test-program" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "test_program" + +[features] +default = [] +cpi = ["no-entrypoint"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +idl-build = ["anchor-lang/idl-build"] + +[dependencies] +anchor-lang = "0.30.1" +inventory = "0.3.15" +ownable = { path = "../../../ownable"} diff --git a/solana-ownable/test-program/programs/test-program/Xargo.toml b/solana-ownable/test-program/programs/test-program/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/solana-ownable/test-program/programs/test-program/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/solana-ownable/test-program/programs/test-program/src/lib.rs b/solana-ownable/test-program/programs/test-program/src/lib.rs new file mode 100644 index 0000000..d005205 --- /dev/null +++ b/solana-ownable/test-program/programs/test-program/src/lib.rs @@ -0,0 +1,54 @@ +use anchor_lang::prelude::*; +use ownable::*; +pub use OwnableError::*; + +declare_id!("6K98qo8BZznst27ieMaCmTNZU7ryExBPgCKndZic8z5d"); + +#[account] +#[derive(Ownable)] +pub struct TestState { + pub ownership: Ownership, + pub data: u64, +} + +#[program] +pub mod test_program { + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + ctx.accounts.state.ownership = Ownership::new(ctx.accounts.authority.key())?; + Ok(()) + } + + pub fn transfer_ownership( + ctx: Context, + new_owner: Pubkey, + ) -> Result<()> { + TestState::transfer_ownership(ctx, new_owner) + } + + pub fn accept_ownership(ctx: Context) -> Result<()> { + TestState::accept_ownership(ctx) + } + + pub fn renounce_ownership(ctx: Context) -> Result<()> { + TestState::renounce_ownership(ctx) + } + + pub fn cancel_transfer(ctx: Context) -> Result<()> { + TestState::cancel_transfer(ctx) + } +} + +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account( + init, + payer = authority, + space = 8 + 33 + 33 + 8 + )] + pub state: Account<'info, TestState>, + #[account(mut)] + pub authority: Signer<'info>, + pub system_program: Program<'info, System>, +} diff --git a/solana-ownable/test-program/tests/test-program.ts b/solana-ownable/test-program/tests/test-program.ts new file mode 100644 index 0000000..ed81957 --- /dev/null +++ b/solana-ownable/test-program/tests/test-program.ts @@ -0,0 +1,304 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { TestProgram } from "../target/types/test_program"; +import { PublicKey, Keypair, Connection } from "@solana/web3.js"; +import { expect } from "chai"; + +describe("Anchor Ownable Tests", () => { + // Test context to hold common state + type TestContext = { + provider: anchor.AnchorProvider; + program: Program; + authority: Keypair; + newOwner: Keypair; + randomPerson: Keypair; + connection: Connection; + }; + + let ctx: TestContext; + let statePubkey: PublicKey; + + // Helper functions + async function setupTestContext(): Promise { + const provider = anchor.AnchorProvider.env(); + anchor.setProvider(provider); + + return { + provider, + program: anchor.workspace.TestProgram as Program, + authority: Keypair.generate(), + newOwner: Keypair.generate(), + randomPerson: Keypair.generate(), + connection: provider.connection, + }; + } + + async function airdropTo(pubkey: PublicKey): Promise { + const signature = await ctx.connection.requestAirdrop(pubkey, 1000000000); + const latestBlockhash = await ctx.connection.getLatestBlockhash(); + + await ctx.connection.confirmTransaction({ + signature, + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + }); + } + + async function initializeState( + owner: Keypair = ctx.authority + ): Promise { + const stateKeypair = Keypair.generate(); + await ctx.program.methods + .initialize() + .accounts({ + state: stateKeypair.publicKey, + authority: owner.publicKey, + systemProgram: anchor.web3.SystemProgram.programId, + }) + .signers([owner, stateKeypair]) + .rpc(); + + return stateKeypair.publicKey; + } + + async function transferOwnership( + state: PublicKey, + newOwner: PublicKey, + authority: Keypair + ): Promise { + await ctx.program.methods + .transferOwnership(newOwner) + .accounts({ + state, + authority: authority.publicKey, + }) + .signers([authority]) + .rpc(); + } + + async function acceptOwnership( + state: PublicKey, + authority: Keypair + ): Promise { + await ctx.program.methods + .acceptOwnership() + .accounts({ + state, + authority: authority.publicKey, + }) + .signers([authority]) + .rpc(); + } + + async function cancelTransfer( + state: PublicKey, + authority: Keypair + ): Promise { + await ctx.program.methods + .cancelTransfer() + .accounts({ + state, + authority: authority.publicKey, + }) + .signers([authority]) + .rpc(); + } + + async function renounceOwnership( + state: PublicKey, + authority: Keypair + ): Promise { + await ctx.program.methods + .renounceOwnership() + .accounts({ + state, + authority: authority.publicKey, + }) + .signers([authority]) + .rpc(); + } + + async function getState(state: PublicKey) { + return await ctx.program.account.testState.fetch(state); + } + + async function expectError( + promise: Promise, + errorMessage: string + ): Promise { + try { + await promise; + expect.fail("should have failed"); + } catch (e) { + expect(e.toString()).to.include(errorMessage); + } + } + + before(async () => { + ctx = await setupTestContext(); + await airdropTo(ctx.authority.publicKey); + }); + + beforeEach(async () => { + statePubkey = await initializeState(); + }); + + describe("Initialization", () => { + it("Initializes program state correctly", async () => { + const state = await getState(statePubkey); + expect(state.ownership.owner.toString()).to.equal( + ctx.authority.publicKey.toString() + ); + expect(state.ownership.pendingOwner).to.be.null; + }); + }); + + describe("Ownership Transfer", () => { + it("Prevents non-owner from transferring ownership", async () => { + await expectError( + transferOwnership(statePubkey, ctx.newOwner.publicKey, ctx.newOwner), + "NotOwner" + ); + }); + + it("Allows owner to transfer ownership", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + const state = await getState(statePubkey); + expect(state.ownership.pendingOwner.toString()).to.equal( + ctx.newOwner.publicKey.toString() + ); + }); + + it("Prevents transfer to zero address", async () => { + await expectError( + transferOwnership( + statePubkey, + anchor.web3.PublicKey.default, + ctx.authority + ), + "InvalidAddress" + ); + }); + + it("Prevents transfer to same address", async () => { + await expectError( + transferOwnership(statePubkey, ctx.authority.publicKey, ctx.authority), + "CannotTransferToSelf" + ); + }); + + it("Owner retains control during pending transfer", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + await cancelTransfer(statePubkey, ctx.authority); + + const state = await getState(statePubkey); + expect(state.ownership.pendingOwner).to.be.null; + }); + }); + + describe("Ownership Acceptance", () => { + beforeEach(async () => { + await airdropTo(ctx.newOwner.publicKey); + await airdropTo(ctx.randomPerson.publicKey); + }); + + it("Prevents owner from accepting ownership", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + await expectError( + acceptOwnership(statePubkey, ctx.randomPerson), + "NotPendingOwner" + ); + }); + + it("Allows pending owner to accept ownership", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + await acceptOwnership(statePubkey, ctx.newOwner); + + const state = await getState(statePubkey); + expect(state.ownership.owner.toString()).to.equal( + ctx.newOwner.publicKey.toString() + ); + expect(state.ownership.pendingOwner).to.be.null; + }); + + it("Prevents accepting non-existent transfer", async () => { + await expectError( + acceptOwnership(statePubkey, ctx.newOwner), + "NoPendingTransfer" + ); + }); + }); + + describe("Transfer Cancellation", () => { + it("Allows owner to cancel transfer", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + await cancelTransfer(statePubkey, ctx.authority); + + const state = await getState(statePubkey); + expect(state.ownership.pendingOwner).to.be.null; + }); + + it("Allows pending owner to cancel transfer", async () => { + await transferOwnership( + statePubkey, + ctx.newOwner.publicKey, + ctx.authority + ); + await cancelTransfer(statePubkey, ctx.newOwner); + + const state = await getState(statePubkey); + expect(state.ownership.pendingOwner).to.be.null; + }); + + it("Prevents cancelling non-existent transfer", async () => { + await expectError( + cancelTransfer(statePubkey, ctx.authority), + "NoPendingTransfer" + ); + }); + }); + + describe("Ownership Renouncement", () => { + it("Allows owner to renounce ownership", async () => { + await renounceOwnership(statePubkey, ctx.authority); + + const state = await getState(statePubkey); + expect(state.ownership.owner).to.be.null; + expect(state.ownership.pendingOwner).to.be.null; + }); + + it("Prevents operations after ownership renouncement", async () => { + await renounceOwnership(statePubkey, ctx.authority); + + await expectError( + transferOwnership(statePubkey, ctx.newOwner.publicKey, ctx.authority), + "NotOwner" + ); + + await expectError( + acceptOwnership(statePubkey, ctx.newOwner), + "NoPendingTransfer" + ); + }); + }); +}); diff --git a/solana-ownable/test-program/tsconfig.json b/solana-ownable/test-program/tsconfig.json new file mode 100644 index 0000000..cd5d2e3 --- /dev/null +++ b/solana-ownable/test-program/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} diff --git a/solana-ownable/test-program/yarn.lock b/solana-ownable/test-program/yarn.lock new file mode 100644 index 0000000..f9c61a6 --- /dev/null +++ b/solana-ownable/test-program/yarn.lock @@ -0,0 +1,1181 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.25.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + +"@coral-xyz/anchor-errors@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz#bdfd3a353131345244546876eb4afc0e125bec30" + integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== + +"@coral-xyz/anchor@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.1.tgz#17f3e9134c28cd0ea83574c6bab4e410bcecec5d" + integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== + dependencies: + "@coral-xyz/anchor-errors" "^0.30.1" + "@coral-xyz/borsh" "^0.30.1" + "@noble/hashes" "^1.3.1" + "@solana/web3.js" "^1.68.0" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + +"@coral-xyz/borsh@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.1.tgz#869d8833abe65685c72e9199b8688477a4f6b0e3" + integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + +"@noble/curves@^1.4.2": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" + integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== + dependencies: + "@noble/hashes" "1.5.0" + +"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + +"@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/web3.js@^1.68.0": + version "1.95.4" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.95.4.tgz#771603f60d75cf7556ad867e1fd2efae32f9ad09" + integrity sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + +"@swc/helpers@^0.5.11": + version "0.5.13" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.13.tgz#33e63ff3cd0cade557672bd7888a39ce7d115a8c" + integrity sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w== + dependencies: + tslib "^2.4.0" + +"@types/bn.js@^5.1.0": + version "5.1.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.6.tgz#9ba818eec0c85e4d3c679518428afdf611d03203" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== + dependencies: + "@types/node" "*" + +"@types/chai@^4.3.0": + version "4.3.20" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" + integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== + +"@types/connect@^3.4.33": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/mocha@^9.0.0": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@types/node@*": + version "22.8.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.1.tgz#b39d4b98165e2ae792ce213f610c7c6108ccfa16" + integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== + dependencies: + undici-types "~6.19.8" + +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@types/ws@^8.2.2": + version "8.5.12" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + dependencies: + "@types/node" "*" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +agentkeepalive@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.10" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-layout@^1.2.0, buffer-layout@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" + integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== + +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bufferutil@^4.0.1: + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + +camelcase@^6.0.0, camelcase@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai@^4.3.4: + version "4.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.1.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + +crypto-hash@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" + integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== + +debug@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +jayson@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.2.tgz#443c26a8658703e0b2e881117b09395d88b6982e" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@^9.0.3: + version "9.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.3" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + growl "1.10.5" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" + ms "2.1.3" + nanoid "3.3.1" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + workerpool "6.2.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.0.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-fetch@^2.6.12, node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.3.0: + version "4.8.2" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.2.tgz#4f802b71c1ab2ca16af830e6c1ea7dd1ad9496fa" + integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +pako@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prettier@^2.6.2: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.4.tgz#9d8ee82533b5d1e13d9ded729e3e38d0d8fa083f" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +source-map-support@^0.5.6: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-2.0.2.tgz#3f6d32fbdc11c357deff127d591a39b996300c54" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +text-encoding-utf-8@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" + integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toml@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.0.0.tgz#41a8d099ac90dbbc64b06976c5025ffaebc53cb9" + integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +tsconfig-paths@^3.5.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^2.0.3, tslib@^2.4.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b" + integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== + +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + +typescript@^4.3.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +undici-types@~6.19.8: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/solana-verifier/.gitignore b/solana-verifier/.gitignore new file mode 100644 index 0000000..2e0446b --- /dev/null +++ b/solana-verifier/.gitignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +**/*.rs.bk +node_modules +test-ledger +.yarn diff --git a/solana-verifier/.prettierignore b/solana-verifier/.prettierignore new file mode 100644 index 0000000..4142583 --- /dev/null +++ b/solana-verifier/.prettierignore @@ -0,0 +1,7 @@ +.anchor +.DS_Store +target +node_modules +dist +build +test-ledger diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml new file mode 100644 index 0000000..f9321a5 --- /dev/null +++ b/solana-verifier/Anchor.toml @@ -0,0 +1,26 @@ +[toolchain] + +[features] +resolution = true +skip-lint = false + +[programs.localnet] +groth_16_verifier = "BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH" +test_bad_verifier = "Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP" +verifier_router = "2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +client = "yarn run ts-node scripts/codma.ts" +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" + +[test] +startup_wait = 5000 +shutdown_wait = 2000 +upgradeable = true diff --git a/solana-verifier/Cargo.lock b/solana-verifier/Cargo.lock new file mode 100644 index 0000000..0d12020 --- /dev/null +++ b/solana-verifier/Cargo.lock @@ -0,0 +1,2405 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-crypto-primitives" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2", + "derivative", + "digest 0.10.7", + "sha2 0.10.8", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-groth16" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" +dependencies = [ + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-relations" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" +dependencies = [ + "ark-ff", + "ark-std", + "tracing", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-snark" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" +dependencies = [ + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.85", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "jobserver", + "libc", + "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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[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 = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "groth_16_verifier" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anyhow", + "ark-bn254", + "ark-serialize", + "arrayvec", + "borsh 1.5.1", + "hex", + "num-bigint", + "num-traits", + "risc0-zkp", + "risc0-zkvm", + "serde", + "serde_json", + "solana-program", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[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 = "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 = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[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 = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[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 = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[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 = "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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags 2.6.0", +] + +[[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", + "regex-syntax", +] + +[[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", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "risc0-binfmt" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" +dependencies = [ + "anyhow", + "borsh 1.5.1", + "elf", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "syn 2.0.85", + "tracing", +] + +[[package]] +name = "risc0-circuit-recursion" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90745aa984e4eb404f0e0eb6a7ab2e956d963a0dad751fb89ef138cc6e4e3afc" +dependencies = [ + "anyhow", + "bytemuck", + "hex", + "metal", + "risc0-core", + "risc0-zkp", + "tracing", +] + +[[package]] +name = "risc0-circuit-rv32im" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "079b2c6789c6cbfee3500aff69108f853bdfe13fd0071ac1fbe3cbf7d0866420" +dependencies = [ + "anyhow", + "metal", + "risc0-binfmt", + "risc0-core", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "tracing", +] + +[[package]] +name = "risc0-core" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" +dependencies = [ + "bytemuck", + "rand_core 0.6.4", +] + +[[package]] +name = "risc0-groth16" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c86b43367c2f29ce1a0ee5730f0af6892e5b6197c8dded614c7ff1068afcd302" +dependencies = [ + "anyhow", + "ark-bn254", + "ark-ec", + "ark-groth16", + "ark-serialize", + "bytemuck", + "hex", + "num-bigint", + "risc0-binfmt", + "risc0-zkp", + "serde", +] + +[[package]] +name = "risc0-zkp" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" +dependencies = [ + "anyhow", + "blake2", + "borsh 1.5.1", + "bytemuck", + "cfg-if", + "digest 0.10.7", + "hex", + "hex-literal", + "metal", + "paste", + "rand_core 0.6.4", + "risc0-core", + "risc0-zkvm-platform", + "serde", + "sha2 0.10.8", + "tracing", +] + +[[package]] +name = "risc0-zkvm" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de11138ba073e43ec494d15728baeddbf3155fc95d5710000077eb5f7f345070" +dependencies = [ + "anyhow", + "borsh 1.5.1", + "bytemuck", + "getrandom 0.2.15", + "hex", + "risc0-binfmt", + "risc0-circuit-recursion", + "risc0-circuit-rv32im", + "risc0-core", + "risc0-groth16", + "risc0-zkp", + "risc0-zkvm-platform", + "rrs-lib", + "semver", + "serde", + "sha2 0.10.8", + "stability", + "tracing", +] + +[[package]] +name = "risc0-zkvm-platform" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" +dependencies = [ + "bytemuck", + "getrandom 0.2.15", + "libm", + "stability", +] + +[[package]] +name = "rrs-lib" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4382d3af3a4ebdae7f64ba6edd9114fff92c89808004c4943b393377a25d001" +dependencies = [ + "downcast-rs", + "paste", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +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.213" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +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_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-frozen-abi" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0c52f25d28a1b5af57d5de3802e49883f68792a343101a9daf9817d8dfffff" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7d0abca44a21c83305e8650341f67ccc919a1a9dd698ddafc86e78b74b9296" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.85", +] + +[[package]] +name = "solana-program" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a99c3bc26fda40f42db98494271bda4906b0d7ab55f3ea7755fa5f110f58b5" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.1", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2ac8d7ef471476164edb2ed105bcf26071835a15f0e74703929d4ec913676b" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.85", +] + +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.85", +] + +[[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 = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "test_bad_verifier" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "groth_16_verifier", +] + +[[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 = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[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-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" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "verifier_router" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "groth_16_verifier", + "ownable", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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-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 = "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 = "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 = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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/solana-verifier/Cargo.toml b/solana-verifier/Cargo.toml new file mode 100644 index 0000000..29c7a9a --- /dev/null +++ b/solana-verifier/Cargo.toml @@ -0,0 +1,15 @@ +[workspace] +members = [ + "programs/*" +] +resolver = "2" + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 + diff --git a/solana-verifier/idl/groth_16_verifier.json b/solana-verifier/idl/groth_16_verifier.json new file mode 100644 index 0000000..89531ce --- /dev/null +++ b/solana-verifier/idl/groth_16_verifier.json @@ -0,0 +1,194 @@ +{ + "address": "HK1z9NG1jsnMYD66bKMLbiLy6xQnLYuLfqqkGSkwYvy8", + "metadata": { + "name": "groth_16_verifier", + "version": "0.1.0", + "spec": "0.1.0", + "description": "Created with Anchor" + }, + "instructions": [ + { + "name": "verify", + "discriminator": [ + 133, + 161, + 141, + 48, + 120, + 198, + 88, + 150 + ], + "accounts": [ + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "proof", + "type": { + "defined": { + "name": "Proof" + } + } + }, + { + "name": "image_id", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "journal_digest", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "vk", + "type": { + "defined": { + "name": "VerificationKey" + } + } + } + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "G1CompressionError", + "msg": "G1 compression error" + }, + { + "code": 6001, + "name": "G2CompressionError", + "msg": "G2 compression error" + }, + { + "code": 6002, + "name": "VerificationError", + "msg": "Verification error" + }, + { + "code": 6003, + "name": "InvalidPublicInput", + "msg": "Invalid public input" + }, + { + "code": 6004, + "name": "ArithmeticError", + "msg": "Arithmetic error" + }, + { + "code": 6005, + "name": "PairingError", + "msg": "Pairing error" + } + ], + "types": [ + { + "name": "Proof", + "type": { + "kind": "struct", + "fields": [ + { + "name": "pi_a", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "pi_b", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "pi_c", + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "VerificationKey", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nr_pubinputs", + "type": "u32" + }, + { + "name": "vk_alpha_g1", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "vk_beta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_gamma_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_delta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_ic", + "type": { + "vec": { + "array": [ + "u8", + 64 + ] + } + } + } + ] + } + } + ] +} diff --git a/solana-verifier/idl/loader-v3.json b/solana-verifier/idl/loader-v3.json new file mode 100644 index 0000000..0408c34 --- /dev/null +++ b/solana-verifier/idl/loader-v3.json @@ -0,0 +1,318 @@ +{ + "version": "0.0.0", + "name": "solana_loader_v3_program", + "instructions": [ + { + "name": "InitializeBuffer", + "accounts": [ + { + "name": "sourceAccount", + "isMut": true, + "isSigner": false, + "docs": ["Source account to initialize."] + }, + { + "name": "bufferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["Buffer authority."] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 0 + } + }, + { + "name": "Write", + "accounts": [ + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": ["Buffer account."] + }, + { + "name": "bufferAuthority", + "isMut": false, + "isSigner": true, + "docs": ["Buffer authority."] + } + ], + "args": [ + { + "name": "offset", + "type": "u32" + }, + { + "name": "bytes", + "type": "bytes" + } + ], + "discriminant": { + "type": "u32", + "value": 1 + } + }, + { + "name": "DeployWithMaxDataLen", + "accounts": [ + { + "name": "payerAccount", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer account that will pay to create the ProgramData account." + ] + }, + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["ProgramData account (uninitialized)."] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": ["Program account (uninitialized)."] + }, + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": ["Buffer account where the program data has been written."] + }, + { + "name": "rentSysvar", + "isMut": false, + "isSigner": false, + "docs": ["Rent sysvar."] + }, + { + "name": "clockSysvar", + "isMut": false, + "isSigner": false, + "docs": ["Clock sysvar."] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["System program."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Authority."] + } + ], + "args": [ + { + "name": "maxDataLen", + "type": "u64" + } + ], + "discriminant": { + "type": "u32", + "value": 2 + } + }, + { + "name": "Upgrade", + "accounts": [ + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["ProgramData account."] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": ["Program account."] + }, + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer account where the new program data has been written." + ] + }, + { + "name": "spillAccount", + "isMut": true, + "isSigner": false, + "docs": ["Spill account."] + }, + { + "name": "rentSysvar", + "isMut": false, + "isSigner": false, + "docs": ["Rent sysvar."] + }, + { + "name": "clockSysvar", + "isMut": false, + "isSigner": false, + "docs": ["Clock sysvar."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Authority."] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 3 + } + }, + { + "name": "SetAuthority", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["Buffer or ProgramData account."] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": ["Current authority."] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": ["New authority (optional)."] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 4 + } + }, + { + "name": "Close", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["Buffer or ProgramData account to close."] + }, + { + "name": "destinationAccount", + "isMut": true, + "isSigner": false, + "docs": ["Destination account for reclaimed lamports."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "isOptional": true, + "docs": ["Authority (optional)."] + }, + { + "name": "programAccount", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": ["Program account (optional)."] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 5 + } + }, + { + "name": "ExtendProgram", + "accounts": [ + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["ProgramData account."] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": ["Program account."] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": ["System program (optional)."] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": ["Payer."] + } + ], + "args": [ + { + "name": "additionalBytes", + "type": "u32" + } + ], + "discriminant": { + "type": "u32", + "value": 6 + } + }, + { + "name": "SetAuthorityChecked", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": ["Buffer or ProgramData account to change the authority of."] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": ["Current authority."] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true, + "docs": ["New authority."] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 7 + } + } + ], + "metadata": { + "origin": "shank", + "address": "BPFLoaderUpgradeab1e11111111111111111111111", + "binaryVersion": "0.4.2", + "libVersion": "^0.4.2" + } +} diff --git a/solana-verifier/idl/loader-v4.json b/solana-verifier/idl/loader-v4.json new file mode 100644 index 0000000..af06f8b --- /dev/null +++ b/solana-verifier/idl/loader-v4.json @@ -0,0 +1,186 @@ +{ + "version": "0.0.0", + "name": "solana_loader_v4_program", + "instructions": [ + { + "name": "Write", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": ["Program account to write to."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Program authority."] + } + ], + "args": [ + { + "name": "offset", + "type": "u32" + }, + { + "name": "bytes", + "type": "bytes" + } + ], + "discriminant": { + "type": "u8", + "value": 0 + } + }, + { + "name": "Truncate", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": true, + "docs": ["Program account to change the size of."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Program authority."] + }, + { + "name": "destination", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["Destination account for reclaimed lamports (optional)."] + } + ], + "args": [ + { + "name": "newSize", + "type": "u32" + } + ], + "discriminant": { + "type": "u8", + "value": 1 + } + }, + { + "name": "Deploy", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": ["Program account to deploy."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Program authority."] + }, + { + "name": "source", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Undeployed source program account to take data and lamports from (optional)." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 2 + } + }, + { + "name": "Retract", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": ["Program account to retract."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Program authority."] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 3 + } + }, + { + "name": "TransferAuthority", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": ["Program account to change the authority of."] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": ["Current program authority."] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true, + "docs": ["New program authority."] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 4 + } + }, + { + "name": "Finalize", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": ["Program account to finalize."] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": ["Program authority."] + }, + { + "name": "nextVersion", + "isMut": false, + "isSigner": false, + "docs": ["The next version of the program (can be itself)."] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 5 + } + } + ], + "metadata": { + "origin": "shank", + "address": "CoreBPFLoaderV41111111111111111111111111111", + "binaryVersion": "0.4.2", + "libVersion": "^0.4.2" + } +} diff --git a/solana-verifier/idl/test_bad_verifier.json b/solana-verifier/idl/test_bad_verifier.json new file mode 100644 index 0000000..f05a4d2 --- /dev/null +++ b/solana-verifier/idl/test_bad_verifier.json @@ -0,0 +1,182 @@ +{ + "address": "AYpEZy2CYjv6pipjiokbFhaPDnxcCTUpYnURg71o9tkR", + "metadata": { + "name": "test_bad_verifier", + "version": "0.1.0", + "spec": "0.1.0", + "description": "Created with Anchor" + }, + "instructions": [ + { + "name": "verify", + "docs": [ + "# WARNING: DO NOT USE IN PRODUCTION ONLY FOR USE IN TESTS", + "", + "Simple verifier that returns false for any proof except for a proof that has a null claim digest", + "", + "To produce a valid proof with this broken verifier send a proof for an empty claim digest where all proof", + "values are null:", + "- pi_a = [0; 64]", + "- pi_b = [0; 128]", + "- pi_c = [0; 64]", + "", + "All other proofs will be rejected by this verifier." + ], + "discriminator": [ + 133, + 161, + 141, + 48, + 120, + 198, + 88, + 150 + ], + "accounts": [ + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "proof", + "type": { + "defined": { + "name": "Proof" + } + } + }, + { + "name": "image_id", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "journal_digest", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "vk", + "type": { + "defined": { + "name": "VerificationKey" + } + } + } + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "VerificationError", + "msg": "Verification Error" + } + ], + "types": [ + { + "name": "Proof", + "type": { + "kind": "struct", + "fields": [ + { + "name": "pi_a", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "pi_b", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "pi_c", + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "VerificationKey", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nr_pubinputs", + "type": "u32" + }, + { + "name": "vk_alpha_g1", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "vk_beta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_gamma_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_delta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_ic", + "type": { + "vec": { + "array": [ + "u8", + 64 + ] + } + } + } + ] + } + } + ] +} diff --git a/solana-verifier/idl/verifier_router.json b/solana-verifier/idl/verifier_router.json new file mode 100644 index 0000000..83bc5dc --- /dev/null +++ b/solana-verifier/idl/verifier_router.json @@ -0,0 +1,924 @@ +{ + "address": "FqTL9adUEYsYFutDPU8rYsn1jXRF8SiVQGjKZbuQ9Sw2", + "metadata": { + "name": "verifier_router", + "version": "0.1.0", + "spec": "0.1.0", + "description": "Created with Anchor" + }, + "instructions": [ + { + "name": "accept_ownership", + "discriminator": [ + 172, + 23, + 43, + 13, + 238, + 213, + 85, + 150 + ], + "accounts": [ + { + "name": "state", + "writable": true + }, + { + "name": "authority", + "writable": true, + "signer": true + } + ], + "args": [] + }, + { + "name": "add_verifier", + "discriminator": [ + 165, + 72, + 135, + 225, + 67, + 181, + 255, + 135 + ], + "accounts": [ + { + "name": "router", + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 114, + 111, + 117, + 116, + 101, + 114 + ] + } + ] + } + }, + { + "name": "verifier_entry", + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 118, + 101, + 114, + 105, + 102, + 105, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "router" + }, + { + "kind": "arg", + "path": "selector" + } + ] + } + }, + { + "name": "verifier_program", + "address": "HK1z9NG1jsnMYD66bKMLbiLy6xQnLYuLfqqkGSkwYvy8" + }, + { + "name": "verifier_program_data" + }, + { + "name": "authority", + "writable": true, + "signer": true + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "selector", + "type": "u32" + }, + { + "name": "verifier", + "type": "pubkey" + } + ] + }, + { + "name": "cancel_transfer", + "discriminator": [ + 50, + 32, + 70, + 130, + 142, + 41, + 111, + 175 + ], + "accounts": [ + { + "name": "state", + "writable": true + }, + { + "name": "authority", + "writable": true, + "signer": true + } + ], + "args": [] + }, + { + "name": "emergency_stop", + "discriminator": [ + 179, + 143, + 200, + 137, + 108, + 245, + 248, + 35 + ], + "accounts": [ + { + "name": "router", + "docs": [ + "The router account containing ownership and verifier registry" + ], + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 114, + 111, + 117, + 116, + 101, + 114 + ] + } + ] + } + }, + { + "name": "verifier_entry", + "docs": [ + "The verifier entry to be closed" + ], + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 118, + 101, + 114, + 105, + 102, + 105, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "router" + }, + { + "kind": "arg", + "path": "selector" + } + ] + } + }, + { + "name": "verifier", + "docs": [ + "The verifier program to be closed", + "We verify this account is a BPF upgradeable loader program and matches our verifier entry" + ], + "writable": true + }, + { + "name": "verifier_program", + "address": "HK1z9NG1jsnMYD66bKMLbiLy6xQnLYuLfqqkGSkwYvy8" + }, + { + "name": "bpf_loader_upgradable_program" + }, + { + "name": "authority", + "docs": [ + "The authority attempting the emergency stop" + ], + "writable": true, + "signer": true + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "selector", + "type": "u32" + } + ] + }, + { + "name": "emergency_stop_with_proof", + "discriminator": [ + 54, + 84, + 135, + 9, + 249, + 7, + 161, + 4 + ], + "accounts": [ + { + "name": "router", + "docs": [ + "The router account containing ownership and verifier registry" + ], + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 114, + 111, + 117, + 116, + 101, + 114 + ] + } + ] + } + }, + { + "name": "verifier_entry", + "docs": [ + "The verifier entry to be closed" + ], + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 118, + 101, + 114, + 105, + 102, + 105, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "router" + }, + { + "kind": "arg", + "path": "selector" + } + ] + } + }, + { + "name": "authority", + "docs": [ + "The authority attempting the emergency stop" + ], + "writable": true, + "signer": true + }, + { + "name": "verifier_program", + "docs": [ + "The program account of the verifier to be used", + "Address is verified against VerifierEntry" + ], + "address": "HK1z9NG1jsnMYD66bKMLbiLy6xQnLYuLfqqkGSkwYvy8" + }, + { + "name": "bpf_loader_upgradable_program" + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "selector", + "type": "u32" + }, + { + "name": "proof", + "type": { + "defined": { + "name": "Proof" + } + } + }, + { + "name": "image_id", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "journal_digest", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "vk", + "type": { + "defined": { + "name": "VerificationKey" + } + } + } + ] + }, + { + "name": "initialize", + "discriminator": [ + 175, + 175, + 109, + 31, + 13, + 152, + 155, + 237 + ], + "accounts": [ + { + "name": "router", + "docs": [ + "The router account to be initialized", + "Space allocated for discriminator + owner + option + count" + ], + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 114, + 111, + 117, + 116, + 101, + 114 + ] + } + ] + } + }, + { + "name": "authority", + "docs": [ + "The authority initializing and paying for the router" + ], + "writable": true, + "signer": true + }, + { + "name": "system_program", + "docs": [ + "Required for account initialization" + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "renounce_ownership", + "discriminator": [ + 19, + 143, + 91, + 79, + 34, + 168, + 174, + 125 + ], + "accounts": [ + { + "name": "state", + "writable": true + }, + { + "name": "authority", + "writable": true, + "signer": true + } + ], + "args": [] + }, + { + "name": "transfer_ownership", + "discriminator": [ + 65, + 177, + 215, + 73, + 53, + 45, + 99, + 47 + ], + "accounts": [ + { + "name": "state", + "writable": true + }, + { + "name": "authority", + "writable": true, + "signer": true + } + ], + "args": [ + { + "name": "new_owner", + "type": "pubkey" + } + ] + }, + { + "name": "verify", + "discriminator": [ + 133, + 161, + 141, + 48, + 120, + 198, + 88, + 150 + ], + "accounts": [ + { + "name": "router", + "docs": [ + "The router account containing the verifier registry" + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 114, + 111, + 117, + 116, + 101, + 114 + ] + } + ] + } + }, + { + "name": "verifier_entry", + "docs": [ + "The verifier entry to use, validated using PDA derivation", + "Seeds are [\"verifier\", router_pubkey, selector_bytes]" + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 118, + 101, + 114, + 105, + 102, + 105, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "router" + }, + { + "kind": "arg", + "path": "selector" + } + ] + } + }, + { + "name": "verifier_program", + "docs": [ + "The program account of the verifier to be used", + "Address is verified against VerifierEntry" + ], + "address": "HK1z9NG1jsnMYD66bKMLbiLy6xQnLYuLfqqkGSkwYvy8" + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "proof", + "type": { + "defined": { + "name": "Proof" + } + } + }, + { + "name": "image_id", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "journal_digest", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "vk", + "type": { + "defined": { + "name": "VerificationKey" + } + } + } + ] + } + ], + "accounts": [ + { + "name": "VerifierEntry", + "discriminator": [ + 102, + 247, + 148, + 158, + 33, + 153, + 100, + 93 + ] + }, + { + "name": "VerifierRouter", + "discriminator": [ + 188, + 46, + 30, + 54, + 25, + 63, + 197, + 26 + ] + } + ], + "events": [ + { + "name": "EmergencyStopEvent", + "discriminator": [ + 44, + 170, + 247, + 63, + 91, + 138, + 146, + 110 + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "VerifierInvalidAuthority", + "msg": "Attempted to add a verifier contract that the router contract does not own and thus cannot delete" + }, + { + "code": 6001, + "name": "VerifierInvalidLoader", + "msg": "Attempted to add a verifier contract that cannot be deleted to the router" + }, + { + "code": 6002, + "name": "SelectorInUse", + "msg": "Selector is already registered" + }, + { + "code": 6003, + "name": "SelectorNotFound", + "msg": "Selector not found" + }, + { + "code": 6004, + "name": "SelectorDeactivated", + "msg": "Selector has been deactivated" + }, + { + "code": 6005, + "name": "InvalidVerifier", + "msg": "Invalid verifier program" + }, + { + "code": 6006, + "name": "Overflow", + "msg": "Arithmetic overflow" + } + ], + "types": [ + { + "name": "EmergencyStopEvent", + "docs": [ + "Event emitted when an emergency stop is executed on a verifier", + "", + "# Fields", + "* `router` - The public key of the router account managing the verifier", + "* `selector` - A u32 that uniquely identifies the verifier entry in the router", + "* `verifier` - The public key of the verifier program being emergency stopped", + "* `triggered_by` - The public key of the account that initiated the emergency stop", + "* `reason` - A string explaining why the emergency stop was triggered" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "router", + "type": "pubkey" + }, + { + "name": "selector", + "type": "u32" + }, + { + "name": "verifier", + "type": "pubkey" + }, + { + "name": "triggered_by", + "type": "pubkey" + }, + { + "name": "reason", + "type": "string" + } + ] + } + }, + { + "name": "Ownership", + "docs": [ + "This structure tracks both the current owner and any pending ownership transfers.", + "It's designed to be embedded within Anchor accounts that need ownership functionality.", + "This structure is 66 bytes in size.", + "", + "# Example", + "```rust", + "#[account]", + "#[derive(Ownable)]", + "pub struct TestState {", + "pub ownership: Ownership,", + "pub data: u64,", + "}", + "```" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "docs": [ + "The current owner's public key" + ], + "type": { + "option": "pubkey" + } + }, + { + "name": "pending_owner", + "docs": [ + "The public key of the pending owner during a transfer, if any" + ], + "type": { + "option": "pubkey" + } + } + ] + } + }, + { + "name": "Proof", + "type": { + "kind": "struct", + "fields": [ + { + "name": "pi_a", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "pi_b", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "pi_c", + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "VerificationKey", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nr_pubinputs", + "type": "u32" + }, + { + "name": "vk_alpha_g1", + "type": { + "array": [ + "u8", + 64 + ] + } + }, + { + "name": "vk_beta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_gamma_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_delta_g2", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "vk_ic", + "type": { + "vec": { + "array": [ + "u8", + 64 + ] + } + } + } + ] + } + }, + { + "name": "VerifierEntry", + "docs": [ + "Account storing information about a registered verifier", + "", + "# Fields", + "* `router` - Public key of the router this entry belongs to", + "* `selector` - Unique identifier for this verifier entry", + "* `verifier` - Public key of the verifier program", + "* `is_active` - Boolean flag indicating if this verifier is currently active" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "router", + "type": "pubkey" + }, + { + "name": "selector", + "type": "u32" + }, + { + "name": "verifier", + "type": "pubkey" + }, + { + "name": "is_active", + "type": "bool" + } + ] + } + }, + { + "name": "VerifierRouter", + "docs": [ + "Main router account storing ownership and verifier count", + "", + "# Fields", + "* `ownership` - Stores the current and pending owner information", + "* `verifier_count` - Total number of verifiers registered in the router" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "ownership", + "type": { + "defined": { + "name": "Ownership" + } + } + }, + { + "name": "verifier_count", + "type": "u32" + } + ] + } + } + ] +} diff --git a/solana-verifier/migrations/deploy.ts b/solana-verifier/migrations/deploy.ts new file mode 100644 index 0000000..82fb175 --- /dev/null +++ b/solana-verifier/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/solana-verifier/package-lock.json b/solana-verifier/package-lock.json new file mode 100644 index 0000000..ec7debb --- /dev/null +++ b/solana-verifier/package-lock.json @@ -0,0 +1,2182 @@ +{ + "name": "solana-verifier", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "license": "ISC", + "dependencies": { + "@coral-xyz/anchor": "^0.30.1", + "@solana/web3.js": "^1.95.5", + "solana-program": "^0.3.6" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } + }, + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@coral-xyz/anchor": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz", + "integrity": "sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@coral-xyz/anchor-errors": "^0.30.1", + "@coral-xyz/borsh": "^0.30.1", + "@noble/hashes": "^1.3.1", + "@solana/web3.js": "^1.68.0", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@coral-xyz/anchor-errors": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz", + "integrity": "sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/@coral-xyz/borsh": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz", + "integrity": "sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "license": "MIT", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.95.5", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz", + "integrity": "sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" + } + }, + "node_modules/@solana/web3.js/node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", + "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.8.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", + "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.8" + } + }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/b58": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/b58/-/b58-4.0.3.tgz", + "integrity": "sha512-VDtdiomm0ywbL8YzgevOZ9pcx6LuOZ3d9qYTPDcYUPf7dRYNA8wvK6epYy0FKMWIM5uaDwd3kWt1x+1S9scB1Q==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "license": "MIT" + }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "license": "MIT", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==", + "license": "MIT" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", + "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", + "license": "MIT", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.5.10" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/merge-anything": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-4.0.5.tgz", + "integrity": "sha512-YsYvYYMYZZITlVqf8UiGWVU8jI8mFNuv64iNY0hKH6alkrZsE3XNVlUnRbUvWnKIzEeYawfY8wNrTuPwHcbleA==", + "license": "MIT", + "dependencies": { + "is-what": "^3.14.1", + "ts-toolbelt": "^9.6.0" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", + "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reflect": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/reflect/-/reflect-0.1.3.tgz", + "integrity": "sha512-2c5cybmpJqWWnz7PviqZZXGtYBQ3EaFAjNFPug/5tnFvC53WXPoNjpLlgzr9W3VyzY8Em9DWump40PySN1sKrw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", + "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", + "license": "Apache-2.0" + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", + "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", + "license": "LGPL-3.0-only", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/@types/ws": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/rpc-websockets/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/solana-program": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/solana-program/-/solana-program-0.3.6.tgz", + "integrity": "sha512-tTka0JyXw6o99fluVACbElg+aNhHEDZmeBA9avgfoFYyIvgVGzrBQE5U6s5woYXH4nqtwNgfmjCFlGdrkcsgzg==", + "license": "MIT", + "dependencies": { + "@solana/web3.js": "^1.30.2", + "b58": "^4.0.3", + "borsh": "^0.6.0", + "merge-anything": "^4.0.2", + "reflect": "^0.1.3", + "reflect-metadata": "^0.1.13", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/solana-program/node_modules/borsh": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.6.0.tgz", + "integrity": "sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superstruct": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz", + "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", + "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "license": "Apache-2.0" + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "license": "0BSD" + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/solana-verifier/package.json b/solana-verifier/package.json new file mode 100644 index 0000000..330ffc6 --- /dev/null +++ b/solana-verifier/package.json @@ -0,0 +1,31 @@ +{ + "license": "ISC", + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", + "client": "ts-node scripts/codma.ts" + }, + "dependencies": { + "@codama/nodes-from-anchor": "^1.0.1", + "@codama/renderers": "^1.0.4", + "@coral-xyz/anchor": "^0.30.1", + "@solana/web3.js": "^2.0.0-rc.4", + "@types/chai-as-promised": "^7.1.2", + "@types/node": "^22.10.0", + "chai-as-promised": "^7.1.2", + "codama": "^1.1.0", + "deep-equal-in-any-order": "^2.0.6", + "solana-bankrun": "^0.4.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/Cargo.toml b/solana-verifier/programs/groth_16_verifier/Cargo.toml similarity index 58% rename from Cargo.toml rename to solana-verifier/programs/groth_16_verifier/Cargo.toml index 362fb27..179002a 100644 --- a/Cargo.toml +++ b/solana-verifier/programs/groth_16_verifier/Cargo.toml @@ -1,34 +1,23 @@ [package] -name = "risc0-solana" +name = "groth_16_verifier" version = "0.1.0" +description = "Created with Anchor" edition = "2021" -license = "Apache-2.0" -homepage = "https://risczero.com/" -repository = "https://github.com/risc0/risc0-solana" [lib] -path = "src/lib.rs" +crate-type = ["cdylib", "lib"] +name = "groth_16_verifier" -[workspace] -resolver = "2" -members = [ - "examples/hello_example/host", - "examples/hello_example/methods", - "examples/hello_example/program", -] - -[workspace.package] -version = "0.1.0" -edition = "2021" -license = "Apache-2.0" -homepage = "https://risczero.com/" -repository = "https://github.com/risc0/risc0-solana" - -# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 -[patch.crates-io] -curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } +[features] +default = [] +cpi = ["no-entrypoint"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +idl-build = ["anchor-lang/idl-build"] [dependencies] +anchor-lang = "0.30.1" anyhow = "1.0.86" ark-bn254 = "0.4.0" ark-serialize = "0.4.2" @@ -40,6 +29,11 @@ risc0-zkp = { version = "1.1.1", default-features = false } serde = { version = "1.0.204", features = ["derive"] } solana-program = "=1.18.20" +# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 +[patch.crates-io] +curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } + + [dev-dependencies] risc0-zkvm = { version = "1.1.1", default-features = false } serde_json = "1.0.120" diff --git a/solana-verifier/programs/groth_16_verifier/Xargo.toml b/solana-verifier/programs/groth_16_verifier/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/solana-verifier/programs/groth_16_verifier/src/error.rs b/solana-verifier/programs/groth_16_verifier/src/error.rs new file mode 100644 index 0000000..7706bb8 --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/src/error.rs @@ -0,0 +1,17 @@ +use anchor_lang::prelude::*; + +#[error_code] +pub enum VerifierError { + #[msg("G1 compression error")] + G1CompressionError, + #[msg("G2 compression error")] + G2CompressionError, + #[msg("Verification error")] + VerificationError, + #[msg("Invalid public input")] + InvalidPublicInput, + #[msg("Arithmetic error")] + ArithmeticError, + #[msg("Pairing error")] + PairingError, +} diff --git a/solana-verifier/programs/groth_16_verifier/src/events.rs b/solana-verifier/programs/groth_16_verifier/src/events.rs new file mode 100644 index 0000000..e69de29 diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs new file mode 100644 index 0000000..230c0ef --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -0,0 +1,220 @@ +use anchor_lang::prelude::*; +use anchor_lang::solana_program::alt_bn128::prelude::{ + alt_bn128_addition, alt_bn128_multiplication, alt_bn128_pairing, +}; +use anchor_lang::solana_program::hash::hashv; +use anchor_lang::system_program; +use risc0_zkp::core::digest::Digest; + +mod error; +mod vk; + +pub use vk::{VerificationKey, VERIFICATION_KEY}; + +use error::*; + +declare_id!("BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH"); + +const ALLOWED_CONTROL_ROOT: &str = + "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; +const BN254_IDENTITY_CONTROL_ID: &str = + "4e160df1e119ac0e3d658755a9edf38c8feb307b34bc10b57f4538dbe122a005"; + +// Base field modulus `q` for BN254 +// https://docs.rs/ark-bn254/latest/ark_bn254/ +pub(crate) const BASE_FIELD_MODULUS_Q: [u8; 32] = [ + 0x30, 0x64, 0x4E, 0x72, 0xE1, 0x31, 0xA0, 0x29, 0xB8, 0x50, 0x45, 0xB6, 0x81, 0x81, 0x58, 0x5D, + 0x97, 0x81, 0x6A, 0x91, 0x68, 0x71, 0xCA, 0x8D, 0x3C, 0x20, 0x8C, 0x16, 0xD8, 0x7C, 0xFD, 0x47, +]; + +#[derive(Accounts)] +// Can't be empty when CPI is enabled see anchor #1628 +pub struct VerifyProof<'info> { + /// CHECK: Only included to satisfy Anchor CPI requirements + #[account(address = system_program::ID)] + pub system_program: AccountInfo<'info>, +} + +#[program] +pub mod groth_16_verifier { + use super::*; + + pub fn verify( + _ctx: Context, + proof: Proof, + // TODO: Anchor really seems to struggle with constant generics in program fields + // Take a look at this after testing because running behind + image_id: [u8; 32], + journal_digest: [u8; 32], + ) -> Result<()> { + verify_proof(&proof, &image_id, &journal_digest) + } +} + +pub fn verify_proof(proof: &Proof, image_id: &[u8; 32], journal_digest: &[u8; 32]) -> Result<()> { + let claim_digest = compute_claim_digest(image_id, journal_digest); + + let public_inputs = public_inputs( + claim_digest, + ALLOWED_CONTROL_ROOT, + BN254_IDENTITY_CONTROL_ID, + )?; + + verify_groth_proof(proof, &public_inputs) +} + +pub fn compute_journal_digest(journal: &[u8]) -> [u8; 32] { + let journal_digest = hashv(&[journal]); + journal_digest.to_bytes() +} + +pub fn compute_claim_digest(image_id: &[u8; 32], journal_digest: &[u8; 32]) -> [u8; 32] { + // Hash the Image ID and the journal inputs + let journal_digest = hashv(&[image_id, journal_digest]); + + journal_digest.to_bytes() +} + +#[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] +pub struct Proof { + // NOTE: `pi_a` is expected to be the **negated** + // version of the proof element. + // + // The pairing equation for Groth16 verification is: + // + // e(-pi_a, vk_beta_g2) * e(vk_alpha_g1, pi_b) * e(prepared_input, vk_gamma_g2) * e(pi_c, vk_delta_g2) == 1 + pub pi_a: [u8; 64], + pub pi_b: [u8; 128], + pub pi_c: [u8; 64], +} + +// TODO: Was converted into Vec because of time constrain, Anchor really not +// liking generic constants +#[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] +pub struct PublicInputs { + pub inputs: Vec<[u8; 32]>, +} + +/// Verifies a Groth16 proof. +/// +/// # Arguments +/// +/// * `proof` - The proof to verify. +/// * `public` - The public inputs to the proof. +/// * `vk` - The verification key. +/// +/// Note: The proof's `pi_a` element is expected to be the negated version of the proof element. +/// Ensure that `pi_a` has been negated before calling this function. +/// +/// # Returns +/// +/// * `Ok(())` if the proof is valid. +/// * `Err(ProgramError)` if the proof is invalid or an error occurs. +pub fn verify_groth_proof(proof: &Proof, public: &PublicInputs /**/) -> Result<()> { + let vk = VERIFICATION_KEY; + // Check vk_ic is the correct length + if vk.vk_ic.len() != public.inputs.len() + 1 { + return Err(error!(VerifierError::InvalidPublicInput)); + } + // Prepare public inputs + let mut prepared = vk.vk_ic[0]; + for (i, input) in public.inputs.iter().enumerate() { + if !is_scalar_valid(input) { + return Err(error!(VerifierError::InvalidPublicInput)); + } + let mul_res = alt_bn128_multiplication(&[&vk.vk_ic[i + 1][..], &input[..]].concat()) + .map_err(|_| error!(VerifierError::ArithmeticError))?; + prepared = alt_bn128_addition(&[&mul_res[..], &prepared[..]].concat()) + .unwrap() + .try_into() + .map_err(|_| error!(VerifierError::ArithmeticError))?; + } + + // Perform pairing check + let pairing_input = [ + proof.pi_a.as_slice(), + proof.pi_b.as_slice(), + prepared.as_slice(), + vk.vk_gamma_g2.as_slice(), + proof.pi_c.as_slice(), + vk.vk_delta_g2.as_slice(), + vk.vk_alpha_g1.as_slice(), + vk.vk_beta_g2.as_slice(), + ] + .concat(); + + // Use the Solana alt_bn128_pairing syscall. + // + // The `alt_bn128_pairing` function does not return the actual pairing result. + // Instead, it returns a 32-byte big-endian integer: + // - If the pairing check passes, it returns 1 represented as a 32-byte big-endian integer (`[0u8; 31] + [1u8]`). + // - If the pairing check fails, it returns 0 represented as a 32-byte big-endian integer (`[0u8; 32]`). + let pairing_res = + alt_bn128_pairing(&pairing_input).map_err(|_| error!(VerifierError::PairingError))?; + + let mut expected = [0u8; 32]; + expected[31] = 1; + + if pairing_res != expected { + return Err(error!(VerifierError::VerificationError)); + } + + Ok(()) +} + +pub fn public_inputs( + claim_digest: [u8; 32], + allowed_control_root: &str, + bn254_identity_control_id: &str, +) -> Result*/> { + let allowed_control_root: Digest = digest_from_hex(allowed_control_root); + let bn254_identity_control_id: Digest = digest_from_hex(bn254_identity_control_id); + + let (a0, a1) = + split_digest_bytes(allowed_control_root).map_err(|_| ProgramError::InvalidAccountData)?; + let (c0, c1) = split_digest_bytes(Digest::from(claim_digest)) + .map_err(|_| ProgramError::InvalidAccountData)?; + + let mut id_bn554 = bn254_identity_control_id.as_bytes().to_vec(); + id_bn554.reverse(); + let id_bn254_fr = to_fixed_array(&id_bn554); + + // TODO: Remove to vec + let inputs = [a0, a1, c0, c1, id_bn254_fr].to_vec(); + + Ok(PublicInputs { inputs }) +} + +fn digest_from_hex(hex_str: &str) -> Digest { + let bytes = hex::decode(hex_str).expect("Invalid hex string"); + Digest::from_bytes(bytes.try_into().expect("Invalid digest length")) +} + +fn split_digest_bytes(d: Digest) -> Result<([u8; 32], [u8; 32])> { + let big_endian: Vec = d.as_bytes().iter().rev().copied().collect(); + let middle = big_endian.len() / 2; + let (b, a) = big_endian.split_at(middle); + Ok((to_fixed_array(a), to_fixed_array(b))) +} + +fn to_fixed_array(input: &[u8]) -> [u8; 32] { + assert!(input.len() <= 32, "Input length must not exceed 32 bytes"); + + let mut fixed_array = [0u8; 32]; + let start_index = 32 - input.len(); + + fixed_array[start_index..].copy_from_slice(input); + fixed_array +} + +// TODO: Regarding the scalar check, should modular reduction be used here instead of a error handler? +fn is_scalar_valid(scalar: &[u8; 32]) -> bool { + for (s_byte, q_byte) in scalar.iter().zip(BASE_FIELD_MODULUS_Q.iter()) { + match s_byte.cmp(q_byte) { + std::cmp::Ordering::Less => return true, // scalar < q + std::cmp::Ordering::Greater => return false, // scalar > q + std::cmp::Ordering::Equal => continue, // check next + } + } + false // scalar == q +} diff --git a/solana-verifier/programs/groth_16_verifier/src/state.rs b/solana-verifier/programs/groth_16_verifier/src/state.rs new file mode 100644 index 0000000..e69de29 diff --git a/solana-verifier/programs/groth_16_verifier/src/vk.rs b/solana-verifier/programs/groth_16_verifier/src/vk.rs new file mode 100644 index 0000000..b9c533a --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/src/vk.rs @@ -0,0 +1,113 @@ +use anchor_lang::prelude::*; +use anchor_lang::{AnchorDeserialize, AnchorSerialize}; + +const G1_LEN: usize = 64; +const G2_LEN: usize = 128; +const IC_LEN: usize = 6; + +#[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] +pub struct VerificationKey { + pub nr_pubinputs: u32, + pub vk_alpha_g1: [u8; G1_LEN], + pub vk_beta_g2: [u8; G2_LEN], + pub vk_gamma_g2: [u8; G2_LEN], + pub vk_delta_g2: [u8; G2_LEN], + // TODO: This was `pub vk_ic: &'a [[u8; G1_LEN]], which should be more efficient, unsure if we can use + // the Anchor Zero Copy data structure to deal with data lifetimes, makes sense to keep as vector until + // further testing + pub vk_ic: [[u8; G1_LEN]; IC_LEN], +} + +pub const VK_ALPHA_G1: [u8; G1_LEN] = [ + 0xe2, 0xf2, 0x6d, 0xbe, 0xa2, 0x99, 0xf5, 0x22, 0x3b, 0x64, 0x6c, 0xb1, 0xfb, 0x33, 0xea, 0xdb, + 0x05, 0x9d, 0x94, 0x07, 0x55, 0x9d, 0x74, 0x41, 0xdf, 0xd9, 0x02, 0xe3, 0xa7, 0x9a, 0x4d, 0x2d, + 0x26, 0x19, 0x4d, 0x00, 0xff, 0xca, 0x76, 0xf0, 0x01, 0x03, 0x23, 0x19, 0x0a, 0x83, 0x89, 0xce, + 0x45, 0xe3, 0x9f, 0x20, 0x60, 0xec, 0xd8, 0x61, 0xb0, 0xce, 0x37, 0x3c, 0x50, 0xdd, 0xbe, 0x14, +]; + +pub const VK_BETA_G2: [u8; G2_LEN] = [ + 0xab, 0xb7, 0x3d, 0xc1, 0x7f, 0xbc, 0x13, 0x02, 0x1e, 0x24, 0x71, 0xe0, 0xc0, 0x8b, 0xd6, 0x7d, + 0x84, 0x01, 0xf5, 0x2b, 0x73, 0xd6, 0xd0, 0x74, 0x83, 0x79, 0x4c, 0xad, 0x47, 0x78, 0x18, 0x0e, + 0x0c, 0x06, 0xf3, 0x3b, 0xbc, 0x4c, 0x79, 0xa9, 0xca, 0xde, 0xf2, 0x53, 0xa6, 0x80, 0x84, 0xd3, + 0x82, 0xf1, 0x77, 0x88, 0xf8, 0x85, 0xc9, 0xaf, 0xd1, 0x76, 0xf7, 0xcb, 0x2f, 0x03, 0x67, 0x09, + 0xc8, 0xce, 0xd0, 0x7a, 0x54, 0x06, 0x7f, 0xd5, 0xa9, 0x05, 0xea, 0x3e, 0xc6, 0xb7, 0x96, 0xf8, + 0x92, 0x91, 0x2f, 0x4d, 0xd2, 0x23, 0x31, 0x31, 0xc7, 0xa8, 0x57, 0xa4, 0xb1, 0xc1, 0x39, 0x17, + 0xa7, 0x46, 0x23, 0x11, 0x4d, 0x9a, 0xa6, 0x9d, 0x37, 0x0d, 0x7a, 0x6b, 0xc4, 0xde, 0xfd, 0xaa, + 0x3c, 0x8c, 0x3f, 0xd9, 0x47, 0xe8, 0xf5, 0x99, 0x4a, 0x70, 0x8a, 0xe0, 0xd1, 0xfb, 0x4c, 0x30, +]; + +pub const VK_GAMMA_G2: [u8; G2_LEN] = [ + 0xed, 0xf6, 0x92, 0xd9, 0x5c, 0xbd, 0xde, 0x46, 0xdd, 0xda, 0x5e, 0xf7, 0xd4, 0x22, 0x43, 0x67, + 0x79, 0x44, 0x5c, 0x5e, 0x66, 0x00, 0x6a, 0x42, 0x76, 0x1e, 0x1f, 0x12, 0xef, 0xde, 0x00, 0x18, + 0xc2, 0x12, 0xf3, 0xae, 0xb7, 0x85, 0xe4, 0x97, 0x12, 0xe7, 0xa9, 0x35, 0x33, 0x49, 0xaa, 0xf1, + 0x25, 0x5d, 0xfb, 0x31, 0xb7, 0xbf, 0x60, 0x72, 0x3a, 0x48, 0x0d, 0x92, 0x93, 0x93, 0x8e, 0x19, + 0xaa, 0x7d, 0xfa, 0x66, 0x01, 0xcc, 0xe6, 0x4c, 0x7b, 0xd3, 0x43, 0x0c, 0x69, 0xe7, 0xd1, 0xe3, + 0x8f, 0x40, 0xcb, 0x8d, 0x80, 0x71, 0xab, 0x4a, 0xeb, 0x6d, 0x8c, 0xdb, 0xa5, 0x5e, 0xc8, 0x12, + 0x5b, 0x97, 0x22, 0xd1, 0xdc, 0xda, 0xac, 0x55, 0xf3, 0x8e, 0xb3, 0x70, 0x33, 0x31, 0x4b, 0xbc, + 0x95, 0x33, 0x0c, 0x69, 0xad, 0x99, 0x9e, 0xec, 0x75, 0xf0, 0x5f, 0x58, 0xd0, 0x89, 0x06, 0x09, +]; + +pub const VK_DELTA_G2: [u8; G2_LEN] = [ + 0x33, 0x03, 0x3e, 0x7f, 0xea, 0x1f, 0x40, 0x60, 0x4e, 0xaa, 0xcf, 0x69, 0x9d, 0x4b, 0xe9, 0xaa, + 0xcc, 0x57, 0x70, 0x54, 0xa0, 0xdb, 0x22, 0xd9, 0x12, 0x9a, 0x17, 0x28, 0xff, 0x85, 0xa0, 0x1a, + 0x1c, 0x3a, 0xf8, 0x29, 0xb6, 0x2b, 0xf4, 0x91, 0x4c, 0x0b, 0xcf, 0x2c, 0x81, 0xa4, 0xbd, 0x57, + 0x71, 0x90, 0xef, 0xf5, 0xf1, 0x94, 0xee, 0x9b, 0xac, 0x95, 0xfa, 0xef, 0xd5, 0x3c, 0xb0, 0x03, + 0xd3, 0xc6, 0x3f, 0x7d, 0x18, 0xdf, 0x42, 0x71, 0x1c, 0xea, 0x2f, 0x9e, 0xd5, 0x74, 0x2d, 0x0b, + 0x2d, 0x83, 0x18, 0x83, 0x17, 0x67, 0xe8, 0x37, 0xe8, 0x57, 0xf7, 0xcb, 0x1f, 0xf3, 0x60, 0x1e, + 0x62, 0x07, 0x03, 0x0d, 0x94, 0xd2, 0x91, 0x5c, 0xca, 0x28, 0x72, 0xfb, 0x6e, 0x36, 0x68, 0xa8, + 0xae, 0xc9, 0x18, 0xd5, 0x46, 0x08, 0x49, 0xf6, 0x19, 0x0b, 0x20, 0x4f, 0x13, 0x10, 0x0c, 0x11, +]; + +pub const VK_IC: [[u8; G1_LEN]; IC_LEN] = [ + [ + 0xe4, 0x3b, 0xdc, 0x65, 0x5d, 0x0f, 0x9d, 0x73, 0x05, 0x35, 0x55, 0x4d, 0x9c, 0xaa, 0x61, + 0x1d, 0xdd, 0x15, 0x2c, 0x08, 0x1a, 0x06, 0xa9, 0x32, 0xa8, 0xe1, 0xd5, 0xdc, 0x25, 0x9a, + 0xac, 0x12, 0xd4, 0xac, 0x80, 0xe9, 0x0e, 0xc6, 0x23, 0x2b, 0xee, 0x3e, 0x0f, 0xd3, 0xa2, + 0xf5, 0x6f, 0x10, 0x69, 0x85, 0x89, 0x1c, 0x91, 0x31, 0x17, 0xd9, 0x7a, 0xbe, 0x1e, 0x58, + 0x44, 0xa7, 0x5a, 0x02, + ], + [ + 0x3f, 0x42, 0xa1, 0x88, 0xf6, 0x83, 0xd8, 0x69, 0x87, 0x3c, 0xcc, 0x4c, 0x11, 0x94, 0x42, + 0xe5, 0x7b, 0x05, 0x6e, 0x03, 0xe2, 0xfa, 0x92, 0xf2, 0x02, 0x8c, 0x97, 0xbc, 0x20, 0xb9, + 0x07, 0x07, 0x42, 0x66, 0xff, 0x87, 0x07, 0x65, 0xa4, 0x82, 0x37, 0x38, 0x03, 0xc2, 0x55, + 0x55, 0xd5, 0xd2, 0xac, 0x81, 0x34, 0xf6, 0x7b, 0x35, 0xbc, 0xf7, 0x54, 0x95, 0x58, 0xb7, + 0x94, 0xa0, 0x32, 0x2e, + ], + [ + 0x47, 0xc3, 0x0f, 0x85, 0x44, 0x46, 0x97, 0xfd, 0xf4, 0x36, 0xe3, 0x48, 0x71, 0x1c, 0x01, + 0x11, 0x15, 0x96, 0x3f, 0x85, 0x51, 0x97, 0x24, 0x3e, 0x4b, 0x39, 0xe6, 0xcb, 0xe2, 0x36, + 0xca, 0x0b, 0x8b, 0x9b, 0xdf, 0xfc, 0xb1, 0x53, 0xc1, 0x09, 0xf4, 0xf7, 0xb8, 0x6d, 0xfa, + 0xd4, 0x35, 0x84, 0x2a, 0x4e, 0x71, 0x68, 0x3d, 0xfa, 0x29, 0x37, 0x3a, 0xcf, 0x48, 0xcf, + 0x9a, 0x7c, 0xde, 0x2e, + ], + [ + 0xa7, 0xf2, 0x04, 0x2e, 0x11, 0xf9, 0x25, 0x5a, 0xfb, 0xb6, 0xc6, 0xe2, 0xc3, 0xac, 0xcb, + 0x88, 0xe4, 0x01, 0xf2, 0xaa, 0xc2, 0x1c, 0x09, 0x7c, 0x92, 0xb3, 0xfb, 0xdb, 0x99, 0xf9, + 0x8a, 0x1b, 0xd6, 0xcc, 0x9c, 0x67, 0x4f, 0xf0, 0x9c, 0x3e, 0x7f, 0x15, 0x60, 0x1a, 0xd8, + 0x86, 0xd5, 0x50, 0xc8, 0x81, 0x2a, 0x19, 0x9f, 0x94, 0x22, 0x57, 0x6f, 0x1b, 0x2e, 0xa9, + 0x6a, 0xa2, 0x91, 0x2b, + ], + [ + 0x0d, 0xcd, 0x6c, 0x07, 0x5a, 0xda, 0x6e, 0xd0, 0xdd, 0xfe, 0xce, 0x1d, 0x4a, 0x2d, 0x00, + 0x5f, 0x61, 0xa7, 0xd5, 0xdf, 0x0b, 0x75, 0xc1, 0x8a, 0x5b, 0x23, 0x74, 0xd6, 0x4e, 0x49, + 0x5f, 0x2b, 0x82, 0x5e, 0xad, 0xb2, 0x65, 0x16, 0xe7, 0xc5, 0x12, 0xf9, 0x14, 0x8f, 0xf8, + 0x6f, 0xa7, 0xb8, 0x63, 0xa8, 0xb9, 0xcb, 0x7f, 0x81, 0xba, 0xcb, 0xb9, 0xaa, 0x20, 0x20, + 0xad, 0x20, 0xe5, 0x2f, + ], + [ + 0x93, 0xd4, 0xc4, 0xb1, 0x20, 0x03, 0x94, 0xd5, 0x25, 0x3c, 0xce, 0x2f, 0x25, 0xa5, 0x9b, + 0x86, 0x2e, 0xe8, 0xe4, 0xcd, 0x43, 0x68, 0x66, 0x03, 0xfa, 0xa0, 0x9d, 0x5d, 0x0d, 0x3c, + 0x1c, 0x0f, 0x09, 0xe8, 0x69, 0x0b, 0xbd, 0x01, 0xaa, 0x87, 0x82, 0xf6, 0x08, 0x36, 0x2f, + 0xbb, 0xc8, 0x8b, 0x2d, 0x48, 0x07, 0xb3, 0x07, 0x0d, 0x8c, 0xfe, 0xf6, 0x25, 0xf4, 0x74, + 0xff, 0xfc, 0x4b, 0x21, + ], +]; + +pub const VERIFICATION_KEY: VerificationKey = VerificationKey { + nr_pubinputs: 5, + vk_alpha_g1: VK_ALPHA_G1, + vk_beta_g2: VK_BETA_G2, + vk_gamma_g2: VK_GAMMA_G2, + vk_delta_g2: VK_DELTA_G2, + vk_ic: VK_IC, +}; diff --git a/test/data/claim_digest.bin b/solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin similarity index 100% rename from test/data/claim_digest.bin rename to solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin diff --git a/test/data/compressed_proof.bin b/solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin similarity index 100% rename from test/data/compressed_proof.bin rename to solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin diff --git a/test/data/r0_test_vk.json b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json similarity index 100% rename from test/data/r0_test_vk.json rename to solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json diff --git a/test/data/receipt.json b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json similarity index 100% rename from test/data/receipt.json rename to solana-verifier/programs/groth_16_verifier/test/data/receipt.json diff --git a/solana-verifier/programs/test_bad_verifier/Cargo.toml b/solana-verifier/programs/test_bad_verifier/Cargo.toml new file mode 100644 index 0000000..07d6e18 --- /dev/null +++ b/solana-verifier/programs/test_bad_verifier/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "test_bad_verifier" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "test_bad_verifier" + +[features] +default = [] +cpi = ["no-entrypoint"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +idl-build = ["anchor-lang/idl-build"] + +[dependencies] +anchor-lang = "0.30.1" +groth_16_verifier = { path = "../groth_16_verifier", features = ["cpi"] } \ No newline at end of file diff --git a/solana-verifier/programs/test_bad_verifier/Xargo.toml b/solana-verifier/programs/test_bad_verifier/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/solana-verifier/programs/test_bad_verifier/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs new file mode 100644 index 0000000..42a65f3 --- /dev/null +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -0,0 +1,58 @@ +use anchor_lang::prelude::*; +use anchor_lang::system_program; +use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; + +declare_id!("Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP"); + +#[error_code] +pub enum VerifierError { + #[msg("Verification Error")] + VerificationError, +} + +#[derive(Accounts)] +// Can't be empty when CPI is enabled see anchor #1628 +pub struct VerifyProof<'info> { + /// CHECK: Only included to satisfy Anchor CPI requirements + #[account(address = system_program::ID)] + pub system_program: AccountInfo<'info>, +} + +#[program] +pub mod test_bad_verifier { + use super::*; + + /// # WARNING: DO NOT USE IN PRODUCTION ONLY FOR USE IN TESTS + /// + /// Simple verifier that returns false for any proof except for a proof that has a null claim digest + /// + /// To produce a valid proof with this broken verifier send a proof for an empty claim digest where all proof + /// values are null: + /// - pi_a = [0; 64] + /// - pi_b = [0; 128] + /// - pi_c = [0; 64] + /// + /// All other proofs will be rejected by this verifier. + pub fn verify( + _ctx: Context, + proof: Proof, + image_id: [u8; 32], + journal_digest: [u8; 32], + ) -> Result<()> { + let empty_32: [u8; 32] = [0; 32]; + let empty_64: [u8; 64] = [0; 64]; + let empty_128: [u8; 128] = [0; 128]; + + require!(image_id == empty_32, VerifierError::VerificationError); + require!(journal_digest == empty_32, VerifierError::VerificationError); + + require!(proof.pi_a == empty_64, VerifierError::VerificationError); + require!(proof.pi_b == empty_128, VerifierError::VerificationError); + require!(proof.pi_c == empty_64, VerifierError::VerificationError); + + Ok(()) + } +} + +#[derive(Accounts)] +pub struct Initialize {} diff --git a/solana-verifier/programs/verifier_router/Cargo.toml b/solana-verifier/programs/verifier_router/Cargo.toml new file mode 100644 index 0000000..d0c9465 --- /dev/null +++ b/solana-verifier/programs/verifier_router/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "verifier_router" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "verifier_router" + +[features] +default = [] +cpi = ["no-entrypoint"] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +idl-build = ["anchor-lang/idl-build"] + +[dependencies] +anchor-lang = "0.30.1" +ownable = { path = "../../../solana-ownable/ownable"} +groth_16_verifier = { path = "../groth_16_verifier", features = ["cpi"] } + diff --git a/solana-verifier/programs/verifier_router/Xargo.toml b/solana-verifier/programs/verifier_router/Xargo.toml new file mode 100644 index 0000000..475fb71 --- /dev/null +++ b/solana-verifier/programs/verifier_router/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/solana-verifier/programs/verifier_router/src/estop/errors.rs b/solana-verifier/programs/verifier_router/src/estop/errors.rs new file mode 100644 index 0000000..bbe47a1 --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/estop/errors.rs @@ -0,0 +1,11 @@ +use anchor_lang::prelude::*; + +/// Error codes specific to emergency stop operations +/// +/// # Variants +/// * `InvalidProofOfExploit` - Returned when a provided proof of invalid behavior fails verification +#[error_code] +pub enum EstopError { + #[msg("Invalid proof of exploit")] + InvalidProofOfExploit, +} diff --git a/solana-verifier/programs/verifier_router/src/estop/events.rs b/solana-verifier/programs/verifier_router/src/estop/events.rs new file mode 100644 index 0000000..0868e5a --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/estop/events.rs @@ -0,0 +1,18 @@ +use anchor_lang::prelude::*; + +/// Event emitted when an emergency stop is executed on a verifier +/// +/// # Fields +/// * `router` - The public key of the router account managing the verifier +/// * `selector` - A u32 that uniquely identifies the verifier entry in the router +/// * `verifier` - The public key of the verifier program being emergency stopped +/// * `triggered_by` - The public key of the account that initiated the emergency stop +/// * `reason` - A string explaining why the emergency stop was triggered +#[event] +pub struct EmergencyStopEvent { + pub router: Pubkey, + pub selector: u32, + pub verifier: Pubkey, + pub triggered_by: Pubkey, + pub reason: String, +} diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs new file mode 100644 index 0000000..d90530e --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -0,0 +1,184 @@ +use anchor_lang::prelude::*; +use anchor_lang::solana_program::program::invoke_signed; +use groth_16_verifier::cpi::accounts::VerifyProof; +use groth_16_verifier::Proof; +pub mod errors; +pub mod events; +use crate::state::{VerifierEntry, VerifierRouter}; +use crate::RouterError; +use errors::EstopError; +use events::EmergencyStopEvent; + +use anchor_lang::solana_program::bpf_loader_upgradeable; + +#[derive(Accounts)] +#[instruction(selector: u32)] +pub struct EmergencyStop<'info> { + /// The router account containing ownership and verifier registry + #[account( + mut, + seeds = [b"router"], + bump + )] + pub router: Account<'info, VerifierRouter>, + + /// The verifier entry to be closed + #[account( + mut, + seeds = [ + b"verifier", + router.key().as_ref(), + &selector.to_le_bytes() + ], + bump, + constraint = verifier_entry.router == router.key(), + constraint = verifier_entry.selector == selector, + constraint = verifier_entry.verifier == verifier_program.key(), + close = authority + )] + pub verifier_entry: Account<'info, VerifierEntry>, + + /// The authority attempting the emergency stop + #[account(mut)] + pub authority: Signer<'info>, + + /// The program account of the verifier to be used + /// Address is verified against VerifierEntry + /// CHECK: This program is deployed and checked against our PDA entries + #[account( + mut, + executable, + constraint = verifier_program.key() == verifier_entry.verifier @ RouterError::InvalidVerifier) + ] + pub verifier_program: UncheckedAccount<'info>, + + /// The Program Data account of the verifier to be closed + #[account( + mut, + seeds = [ + verifier_program.key().as_ref() + ], + bump, + seeds::program = bpf_loader_upgradeable::ID, + )] + pub verifier_program_data: Account<'info, ProgramData>, + + /// CHECK: This is the BPF Loader for calling close + #[account(constraint = bpf_loader_upgradable_program.key() == bpf_loader_upgradeable::ID)] + pub bpf_loader_upgradable_program: UncheckedAccount<'info>, + + pub system_program: Program<'info, System>, +} + +pub fn emergency_stop_by_owner(ctx: Context, selector: u32) -> Result<()> { + // Verify the caller is Contract Owner + ctx.accounts + .router + .ownership + .assert_owner(&ctx.accounts.authority)?; + + close_verifier( + &ctx.accounts.router, + ctx.bumps.router, + &ctx.accounts.authority, + &ctx.accounts.verifier_program, + &ctx.accounts.verifier_program_data, + &ctx.accounts.bpf_loader_upgradable_program, + )?; + + emit!(EmergencyStopEvent { + router: ctx.accounts.router.key(), + selector, + verifier: ctx.accounts.verifier_entry.verifier, + triggered_by: ctx.accounts.authority.key(), + reason: "Owner has revoked the verifier.".to_string() + }); + + Ok(()) +} + +fn close_verifier<'info>( + router: &Account<'info, VerifierRouter>, + router_bumps: u8, + recipient: &Signer<'info>, + verifier_program: &UncheckedAccount<'info>, + verifier_program_data: &Account<'info, ProgramData>, + loader_v3: &UncheckedAccount<'info>, +) -> Result<()> { + let router_seed = &[b"router".as_ref(), &[router_bumps]]; + + let close_instruction = bpf_loader_upgradeable::close_any( + &verifier_program_data.key(), + &recipient.key(), + Some(&router.key()), + Some(&verifier_program.key()), + ); + + invoke_signed( + &close_instruction, + &[ + verifier_program_data.to_account_info(), + recipient.to_account_info(), + router.to_account_info(), + verifier_program.to_account_info(), + loader_v3.to_account_info(), + ], + &[router_seed], + )?; + + Ok(()) +} + +pub fn emergency_stop_with_proof( + ctx: Context, + selector: u32, + proof: Proof, + image_id: [u8; 32], + journal_digest: [u8; 32], +) -> Result<()> { + let zero_array = [0u8; 32]; + + msg!("Emeregency Stop With Proof Reached!"); + require!( + image_id == zero_array && journal_digest == zero_array, + EstopError::InvalidProofOfExploit + ); + msg!("Proof requierements Passed!"); + + // Attempt to verify the proof + let verifier_program = ctx.accounts.verifier_program.to_account_info(); + let verifier_accounts = VerifyProof { + system_program: ctx.accounts.system_program.to_account_info(), + }; + + msg!("Making CPI call to verifier"); + let verify_ctx = CpiContext::new(verifier_program, verifier_accounts); + let _ = groth_16_verifier::cpi::verify(verify_ctx, proof, image_id, journal_digest); + + msg!("Call did pass"); + let router_seed = &[b"router".as_ref(), &[ctx.bumps.router]]; + msg!( + "Router Seed: {:?} & Bumps: {} ", + router_seed, + ctx.bumps.router + ); + + close_verifier( + &ctx.accounts.router, + ctx.bumps.router, + &ctx.accounts.authority, + &ctx.accounts.verifier_program, + &ctx.accounts.verifier_program_data, + &ctx.accounts.bpf_loader_upgradable_program, + )?; + + emit!(EmergencyStopEvent { + router: ctx.accounts.router.key(), + selector, + verifier: ctx.accounts.verifier_entry.verifier, + triggered_by: ctx.accounts.authority.key(), + reason: "Invalid Proof was demonstrated, verifier compromised.".to_string() + }); + + Ok(()) +} diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs new file mode 100644 index 0000000..45e66b8 --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -0,0 +1,77 @@ +use anchor_lang::prelude::*; +use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; + +pub mod estop; +pub mod router; +pub mod state; +pub use ownable::OwnableError; + +use estop::*; +use router::*; +use state::*; + +declare_id!("2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK"); +#[program] +pub mod verifier_router { + use ownable::OwnableError; + use state::VerifierRouter; + + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + router::initialize(ctx) + } + + pub fn add_verifier(ctx: Context, selector: u32) -> Result<()> { + // This function checks ownership and can only be called by the owner + router::add_verifier(ctx, selector) + } + + pub fn verify( + ctx: Context, + proof: Proof, + selector: u32, + image_id: [u8; 32], + journal_digest: [u8; 32], + ) -> Result<()> { + router::verify(ctx, proof, image_id, journal_digest) + } + + pub fn emergency_stop(ctx: Context, selector: u32) -> Result<()> { + // This function checks ownership and can only be called by the owner + estop::emergency_stop_by_owner(ctx, selector) + } + + pub fn emergency_stop_with_proof( + ctx: Context, + selector: u32, + proof: Proof, + image_id: [u8; 32], + journal_digest: [u8; 32], + ) -> Result<()> { + estop::emergency_stop_with_proof(ctx, selector, proof, image_id, journal_digest) + } + + pub fn transfer_ownership( + ctx: Context, + new_owner: Pubkey, + ) -> Result<()> { + // This function checks ownership and can only be called by the owner + VerifierRouter::transfer_ownership(ctx, new_owner) + } + + pub fn accept_ownership(ctx: Context) -> Result<()> { + // This function can only be called by the pending owner + VerifierRouter::accept_ownership(ctx) + } + + pub fn cancel_transfer(ctx: Context) -> Result<()> { + // This function checks ownership and can only be called by the owner or pending owner + VerifierRouter::cancel_transfer(ctx) + } + + pub fn renounce_ownership(ctx: Context) -> Result<()> { + // This function checks ownership and can only be called by the owner + VerifierRouter::renounce_ownership(ctx) + } +} diff --git a/solana-verifier/programs/verifier_router/src/router/error.rs b/solana-verifier/programs/verifier_router/src/router/error.rs new file mode 100644 index 0000000..b14ab7a --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/router/error.rs @@ -0,0 +1,19 @@ +use anchor_lang::prelude::*; + +#[error_code] +pub enum RouterError { + #[msg("Attempted to add a verifier contract that the router contract does not own and thus cannot delete")] + VerifierInvalidAuthority, + #[msg("Program provided account does not match the key in the verifier program data account")] + VerifierInvalidLoader, + #[msg("Selector is not valid for this call.")] + SelectorInvalid, + #[msg("Selector not found")] + SelectorNotFound, + #[msg("Selector has been deactivated")] + SelectorDeactivated, + #[msg("Invalid verifier program")] + InvalidVerifier, + #[msg("Arithmetic overflow")] + Overflow, +} diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs new file mode 100644 index 0000000..d88e942 --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -0,0 +1,194 @@ +pub mod error; +pub use error::RouterError; +pub use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; + +use crate::state::{VerifierEntry, VerifierRouter}; +use anchor_lang::prelude::*; +use anchor_lang::solana_program::bpf_loader_upgradeable; +use ownable::Ownership; +pub use groth_16_verifier::program::Groth16Verifier; +use groth_16_verifier::cpi::accounts::VerifyProof; + +/// Account validation struct for router initialization +#[derive(Accounts)] +pub struct Initialize<'info> { + /// The router account to be initialized + /// Space allocated for discriminator + owner + option + count + #[account( + init, + seeds = [b"router"], + bump, + payer = authority, + space = 8 + 32 + 33 + 4 + )] + pub router: Account<'info, VerifierRouter>, + + /// The authority initializing and paying for the router + #[account(mut)] + pub authority: Signer<'info>, + + /// Required for account initialization + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +#[instruction(selector: u32)] +pub struct AddVerifier<'info> { + #[account( + mut, + seeds = [b"router"], + bump + )] + pub router: Account<'info, VerifierRouter>, + + #[account( + init, + payer = authority, + space = 8 + 32 + 4 + 32, + seeds = [ + b"verifier", + router.key().as_ref(), + &selector.to_le_bytes() + ], + bump, + constraint = selector == router.verifier_count + 1 @ RouterError::SelectorInvalid + )] + pub verifier_entry: Account<'info, VerifierEntry>, + + #[account( + seeds = [ + verifier_program.key().as_ref() + ], + bump, + seeds::program = bpf_loader_upgradeable::ID, + constraint = verifier_program_data.upgrade_authority_address == Some(router.key()) @ RouterError::VerifierInvalidAuthority + )] + pub verifier_program_data: Account<'info, ProgramData>, + + #[account( + executable + )] + /// CHECK: checks are done by constraint in program data account + pub verifier_program: UncheckedAccount<'info>, + + #[account(mut)] + pub authority: Signer<'info>, + + pub system_program: Program<'info, System>, +} + +/// Account validation struct for verifier operations +/// +/// # Arguments +/// * `selector` - A u32 that uniquely identifies the verifier entry +#[derive(Accounts)] +#[instruction(selector: u32)] +pub struct Verify<'info> { + /// The router account containing the verifier registry + #[account( + seeds = [b"router"], + bump + )] + pub router: Account<'info, VerifierRouter>, + + /// The verifier entry to use, validated using PDA derivation + /// Seeds are ["verifier", router_pubkey, selector_bytes] + #[account( + seeds = [ + b"verifier", + router.key().as_ref(), + &selector.to_le_bytes() + ], + bump, + constraint = verifier_entry.router == router.key(), + constraint = verifier_entry.selector == selector, + )] + pub verifier_entry: Account<'info, VerifierEntry>, + + /// The verifier Program account that is matched to the verifier entry + /// CHECK: Manually checked to be the same value of the verifier entry program + #[account( + executable, + address = verifier_entry.verifier @ RouterError::InvalidVerifier + )] + pub verifier_program: UncheckedAccount<'info>, + + /// CHECK: Only included to staisfy Anchor CPI requirements + pub system_program: Program<'info, System> +} + +/// Initializes a new router with the given authority as owner +/// +/// # Arguments +/// * `ctx` - The context containing validated accounts +/// +/// # Returns +/// * `Ok(())` if initialization is successful +pub fn initialize(ctx: Context) -> Result<()> { + let router = &mut ctx.accounts.router; + router.ownership = Ownership::new(ctx.accounts.authority.key())?; + router.verifier_count = 0; + Ok(()) +} + +/// Add a new verifier to the router +/// +/// # Arguments +/// * `ctx` - The context containing validated accounts +/// * `selector` - The selector to associate with this verifier +/// * `verifier` - The public key of the verifier program +/// +/// # Returns +/// * `Ok(())` if the verifier is successfully added +/// * `Err(RouterError::SelectorInUse)` if the selector is already in use +/// * `Err(RouterError::InvalidLoader)` if the verifier uses the wrong loader +/// * `Err(RouterError::InvalidAuthority)` if the router is not the upgrade authority +/// * `Err(RouterError::Overflow)` if adding the verifier would overflow the counter +pub fn add_verifier(ctx: Context, selector: u32) -> Result<()> { + // Verify the caller is the owner of the contract + ctx.accounts + .router + .ownership + .assert_owner(&ctx.accounts.authority)?; + + let router = &mut ctx.accounts.router; + let entry = &mut ctx.accounts.verifier_entry; + + entry.router = router.key(); + entry.selector = selector; + entry.verifier = ctx.accounts.verifier_program.key(); + + router.verifier_count = router + .verifier_count + .checked_add(1) + .ok_or(error!(RouterError::Overflow))?; + + Ok(()) +} + +/// Verifies a proof using the specified verifier +/// +/// # Arguments +/// * `ctx` - The context containing validated accounts +/// * `seal` - The seal data to be verified +/// * `image_id` - The image ID associated with the proof +/// * `journal_digest` - The journal digest for verification +/// +/// # Returns +/// * `Ok(())` if the verification is successful +pub fn verify( + ctx: Context, + proof: Proof, + image_id: [u8; 32], + journal_digest: [u8; 32], +) -> Result<()> { + let verifier = &ctx.accounts.verifier_entry; + + let verifier_program = ctx.accounts.verifier_program.to_account_info(); + let verifier_accounts = VerifyProof { + system_program: ctx.accounts.system_program.to_account_info(), + }; + + let verify_ctx = CpiContext::new(verifier_program, verifier_accounts); + groth_16_verifier::cpi::verify(verify_ctx, proof, image_id, journal_digest) +} \ No newline at end of file diff --git a/solana-verifier/programs/verifier_router/src/state/mod.rs b/solana-verifier/programs/verifier_router/src/state/mod.rs new file mode 100644 index 0000000..5ed1af9 --- /dev/null +++ b/solana-verifier/programs/verifier_router/src/state/mod.rs @@ -0,0 +1,28 @@ +use anchor_lang::prelude::*; +use ownable::{Ownable, Ownership}; + +/// Main router account storing ownership and verifier count +/// +/// # Fields +/// * `ownership` - Stores the current and pending owner information +/// * `verifier_count` - Total number of verifiers registered in the router +#[account] +#[derive(Ownable)] +pub struct VerifierRouter { + pub ownership: Ownership, + pub verifier_count: u32, +} + +/// Account storing information about a registered verifier +/// +/// # Fields +/// * `router` - Public key of the router this entry belongs to +/// * `selector` - Unique identifier for this verifier entry +/// * `verifier` - Public key of the verifier program +/// * `is_active` - Boolean flag indicating if this verifier is currently active +#[account] +pub struct VerifierEntry { + pub router: Pubkey, + pub selector: u32, + pub verifier: Pubkey, +} diff --git a/solana-verifier/scripts/bad-verifier/errors/index.ts b/solana-verifier/scripts/bad-verifier/errors/index.ts new file mode 100644 index 0000000..507d3ae --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/errors/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './testBadVerifier'; diff --git a/solana-verifier/scripts/bad-verifier/errors/testBadVerifier.ts b/solana-verifier/scripts/bad-verifier/errors/testBadVerifier.ts new file mode 100644 index 0000000..f015750 --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/errors/testBadVerifier.ts @@ -0,0 +1,60 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + isProgramError, + type Address, + type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, + type SolanaError, +} from '@solana/web3.js'; +import { TEST_BAD_VERIFIER_PROGRAM_ADDRESS } from '../programs'; + +/** VerificationError: Verification Error */ +export const TEST_BAD_VERIFIER_ERROR__VERIFICATION_ERROR = 0x1770; // 6000 + +export type TestBadVerifierError = + typeof TEST_BAD_VERIFIER_ERROR__VERIFICATION_ERROR; + +let testBadVerifierErrorMessages: + | Record + | undefined; +if (process.env.NODE_ENV !== 'production') { + testBadVerifierErrorMessages = { + [TEST_BAD_VERIFIER_ERROR__VERIFICATION_ERROR]: `Verification Error`, + }; +} + +export function getTestBadVerifierErrorMessage( + code: TestBadVerifierError +): string { + if (process.env.NODE_ENV !== 'production') { + return ( + testBadVerifierErrorMessages as Record + )[code]; + } + + return 'Error message not available in production bundles.'; +} + +export function isTestBadVerifierError< + TProgramErrorCode extends TestBadVerifierError, +>( + error: unknown, + transactionMessage: { + instructions: Record; + }, + code?: TProgramErrorCode +): error is SolanaError & + Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { + return isProgramError( + error, + transactionMessage, + TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + code + ); +} diff --git a/solana-verifier/scripts/bad-verifier/index.ts b/solana-verifier/scripts/bad-verifier/index.ts new file mode 100644 index 0000000..a079960 --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/index.ts @@ -0,0 +1,11 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './errors'; +export * from './instructions'; +export * from './programs'; diff --git a/solana-verifier/scripts/bad-verifier/instructions/index.ts b/solana-verifier/scripts/bad-verifier/instructions/index.ts new file mode 100644 index 0000000..a80e914 --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/instructions/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './verify'; diff --git a/solana-verifier/scripts/bad-verifier/instructions/verify.ts b/solana-verifier/scripts/bad-verifier/instructions/verify.ts new file mode 100644 index 0000000..9210368 --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/instructions/verify.ts @@ -0,0 +1,199 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getArrayDecoder, + getArrayEncoder, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { TEST_BAD_VERIFIER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const VERIFY_DISCRIMINATOR = new Uint8Array([ + 133, 161, 141, 48, 120, 198, 88, 150, +]); + +export function getVerifyDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode(VERIFY_DISCRIMINATOR); +} + +export type VerifyInstruction< + TProgram extends string = typeof TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type VerifyInstructionData = { + discriminator: ReadonlyUint8Array; + piA: ReadonlyUint8Array; + piB: Array; + piC: ReadonlyUint8Array; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export type VerifyInstructionDataArgs = { + piA: ReadonlyUint8Array; + piB: Array; + piC: ReadonlyUint8Array; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export function getVerifyInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['piA', fixEncoderSize(getBytesEncoder(), 64)], + ['piB', getArrayEncoder(getU8Encoder(), { size: 128 })], + ['piC', fixEncoderSize(getBytesEncoder(), 64)], + ['imageId', fixEncoderSize(getBytesEncoder(), 32)], + ['journalDigest', fixEncoderSize(getBytesEncoder(), 32)], + ]), + (value) => ({ ...value, discriminator: VERIFY_DISCRIMINATOR }) + ); +} + +export function getVerifyInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['piA', fixDecoderSize(getBytesDecoder(), 64)], + ['piB', getArrayDecoder(getU8Decoder(), { size: 128 })], + ['piC', fixDecoderSize(getBytesDecoder(), 64)], + ['imageId', fixDecoderSize(getBytesDecoder(), 32)], + ['journalDigest', fixDecoderSize(getBytesDecoder(), 32)], + ]); +} + +export function getVerifyInstructionDataCodec(): Codec< + VerifyInstructionDataArgs, + VerifyInstructionData +> { + return combineCodec( + getVerifyInstructionDataEncoder(), + getVerifyInstructionDataDecoder() + ); +} + +export type VerifyInput = { + systemProgram?: Address; + piA: VerifyInstructionDataArgs['piA']; + piB: VerifyInstructionDataArgs['piB']; + piC: VerifyInstructionDataArgs['piC']; + imageId: VerifyInstructionDataArgs['imageId']; + journalDigest: VerifyInstructionDataArgs['journalDigest']; +}; + +export function getVerifyInstruction< + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof TEST_BAD_VERIFIER_PROGRAM_ADDRESS, +>( + input: VerifyInput, + config?: { programAddress?: TProgramAddress } +): VerifyInstruction { + // Program address. + const programAddress = + config?.programAddress ?? TEST_BAD_VERIFIER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [getAccountMeta(accounts.systemProgram)], + programAddress, + data: getVerifyInstructionDataEncoder().encode( + args as VerifyInstructionDataArgs + ), + } as VerifyInstruction; + + return instruction; +} + +export type ParsedVerifyInstruction< + TProgram extends string = typeof TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + systemProgram: TAccountMetas[0]; + }; + data: VerifyInstructionData; +}; + +export function parseVerifyInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedVerifyInstruction { + if (instruction.accounts.length < 1) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + systemProgram: getNextAccount(), + }, + data: getVerifyInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/bad-verifier/programs/index.ts b/solana-verifier/scripts/bad-verifier/programs/index.ts new file mode 100644 index 0000000..507d3ae --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './testBadVerifier'; diff --git a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts new file mode 100644 index 0000000..e47853c --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts @@ -0,0 +1,49 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + containsBytes, + fixEncoderSize, + getBytesEncoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { type ParsedVerifyInstruction } from '../instructions'; + +export const TEST_BAD_VERIFIER_PROGRAM_ADDRESS = + 'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP' as Address<'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP'>; + +export enum TestBadVerifierInstruction { + Verify, +} + +export function identifyTestBadVerifierInstruction( + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): TestBadVerifierInstruction { + const data = 'data' in instruction ? instruction.data : instruction; + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([133, 161, 141, 48, 120, 198, 88, 150]) + ), + 0 + ) + ) { + return TestBadVerifierInstruction.Verify; + } + throw new Error( + 'The provided instruction could not be identified as a testBadVerifier instruction.' + ); +} + +export type ParsedTestBadVerifierInstruction< + TProgram extends string = 'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP', +> = { + instructionType: TestBadVerifierInstruction.Verify; +} & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/bad-verifier/shared/index.ts b/solana-verifier/scripts/bad-verifier/shared/index.ts new file mode 100644 index 0000000..01a7d93 --- /dev/null +++ b/solana-verifier/scripts/bad-verifier/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/solana-verifier/scripts/codma.ts b/solana-verifier/scripts/codma.ts new file mode 100644 index 0000000..f5e53bf --- /dev/null +++ b/solana-verifier/scripts/codma.ts @@ -0,0 +1,31 @@ +import { createFromRoot } from "codama"; +import { renderJavaScriptVisitor } from "@codama/renderers"; +import { rootNodeFromAnchor } from "@codama/nodes-from-anchor"; +import path from "node:path"; + +// Create Codama instances dynamically +const routerIdlPath = path.normalize("../target/idl/verifier_router.json"); +const grothIdlPath = path.normalize("../target/idl/groth_16_verifier.json"); +const badVerifierIdlPath = path.normalize( + "../target/idl/test_bad_verifier.json" +); +const loaderV3IdlPath = path.normalize("../idl/loader-v3.json"); +const loaderV4IdlPath = path.normalize("../idl/loader-v4.json"); + +const routerIdl = require(routerIdlPath); +const grothIdl = require(grothIdlPath); +const badVerifierIdl = require(badVerifierIdlPath); +const loaderV3Idl = require(loaderV3IdlPath); +const loaderV4Idl = require(loaderV4IdlPath); + +const routerCodama = createFromRoot(rootNodeFromAnchor(routerIdl)); +const grothCodama = createFromRoot(rootNodeFromAnchor(grothIdl)); +const badVerifierCodama = createFromRoot(rootNodeFromAnchor(badVerifierIdl)); +const loaderV3Codama = createFromRoot(rootNodeFromAnchor(loaderV3Idl)); +const loaderV4Codama = createFromRoot(rootNodeFromAnchor(loaderV4Idl)); + +routerCodama.accept(renderJavaScriptVisitor("./scripts/verify-router")); +grothCodama.accept(renderJavaScriptVisitor("./scripts/groth16")); +badVerifierCodama.accept(renderJavaScriptVisitor("./scripts/bad-verifier")); +loaderV3Codama.accept(renderJavaScriptVisitor("./scripts/loaderV3")); +loaderV4Codama.accept(renderJavaScriptVisitor("./scripts/loaderV4")); diff --git a/solana-verifier/scripts/groth16/errors/groth16Verifier.ts b/solana-verifier/scripts/groth16/errors/groth16Verifier.ts new file mode 100644 index 0000000..d298fef --- /dev/null +++ b/solana-verifier/scripts/groth16/errors/groth16Verifier.ts @@ -0,0 +1,80 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + isProgramError, + type Address, + type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, + type SolanaError, +} from '@solana/web3.js'; +import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from '../programs'; + +/** G1CompressionError: G1 compression error */ +export const GROTH16_VERIFIER_ERROR__G1_COMPRESSION_ERROR = 0x1770; // 6000 +/** G2CompressionError: G2 compression error */ +export const GROTH16_VERIFIER_ERROR__G2_COMPRESSION_ERROR = 0x1771; // 6001 +/** VerificationError: Verification error */ +export const GROTH16_VERIFIER_ERROR__VERIFICATION_ERROR = 0x1772; // 6002 +/** InvalidPublicInput: Invalid public input */ +export const GROTH16_VERIFIER_ERROR__INVALID_PUBLIC_INPUT = 0x1773; // 6003 +/** ArithmeticError: Arithmetic error */ +export const GROTH16_VERIFIER_ERROR__ARITHMETIC_ERROR = 0x1774; // 6004 +/** PairingError: Pairing error */ +export const GROTH16_VERIFIER_ERROR__PAIRING_ERROR = 0x1775; // 6005 + +export type Groth16VerifierError = + | typeof GROTH16_VERIFIER_ERROR__ARITHMETIC_ERROR + | typeof GROTH16_VERIFIER_ERROR__G1_COMPRESSION_ERROR + | typeof GROTH16_VERIFIER_ERROR__G2_COMPRESSION_ERROR + | typeof GROTH16_VERIFIER_ERROR__INVALID_PUBLIC_INPUT + | typeof GROTH16_VERIFIER_ERROR__PAIRING_ERROR + | typeof GROTH16_VERIFIER_ERROR__VERIFICATION_ERROR; + +let groth16VerifierErrorMessages: + | Record + | undefined; +if (process.env.NODE_ENV !== 'production') { + groth16VerifierErrorMessages = { + [GROTH16_VERIFIER_ERROR__ARITHMETIC_ERROR]: `Arithmetic error`, + [GROTH16_VERIFIER_ERROR__G1_COMPRESSION_ERROR]: `G1 compression error`, + [GROTH16_VERIFIER_ERROR__G2_COMPRESSION_ERROR]: `G2 compression error`, + [GROTH16_VERIFIER_ERROR__INVALID_PUBLIC_INPUT]: `Invalid public input`, + [GROTH16_VERIFIER_ERROR__PAIRING_ERROR]: `Pairing error`, + [GROTH16_VERIFIER_ERROR__VERIFICATION_ERROR]: `Verification error`, + }; +} + +export function getGroth16VerifierErrorMessage( + code: Groth16VerifierError +): string { + if (process.env.NODE_ENV !== 'production') { + return ( + groth16VerifierErrorMessages as Record + )[code]; + } + + return 'Error message not available in production bundles.'; +} + +export function isGroth16VerifierError< + TProgramErrorCode extends Groth16VerifierError, +>( + error: unknown, + transactionMessage: { + instructions: Record; + }, + code?: TProgramErrorCode +): error is SolanaError & + Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { + return isProgramError( + error, + transactionMessage, + GROTH16_VERIFIER_PROGRAM_ADDRESS, + code + ); +} diff --git a/solana-verifier/scripts/groth16/errors/index.ts b/solana-verifier/scripts/groth16/errors/index.ts new file mode 100644 index 0000000..c11c269 --- /dev/null +++ b/solana-verifier/scripts/groth16/errors/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './groth16Verifier'; diff --git a/solana-verifier/scripts/groth16/index.ts b/solana-verifier/scripts/groth16/index.ts new file mode 100644 index 0000000..a079960 --- /dev/null +++ b/solana-verifier/scripts/groth16/index.ts @@ -0,0 +1,11 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './errors'; +export * from './instructions'; +export * from './programs'; diff --git a/solana-verifier/scripts/groth16/instructions/index.ts b/solana-verifier/scripts/groth16/instructions/index.ts new file mode 100644 index 0000000..a80e914 --- /dev/null +++ b/solana-verifier/scripts/groth16/instructions/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './verify'; diff --git a/solana-verifier/scripts/groth16/instructions/verify.ts b/solana-verifier/scripts/groth16/instructions/verify.ts new file mode 100644 index 0000000..ff9e3f2 --- /dev/null +++ b/solana-verifier/scripts/groth16/instructions/verify.ts @@ -0,0 +1,199 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getArrayDecoder, + getArrayEncoder, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const VERIFY_DISCRIMINATOR = new Uint8Array([ + 133, 161, 141, 48, 120, 198, 88, 150, +]); + +export function getVerifyDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode(VERIFY_DISCRIMINATOR); +} + +export type VerifyInstruction< + TProgram extends string = typeof GROTH16_VERIFIER_PROGRAM_ADDRESS, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type VerifyInstructionData = { + discriminator: ReadonlyUint8Array; + piA: ReadonlyUint8Array; + piB: Array; + piC: ReadonlyUint8Array; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export type VerifyInstructionDataArgs = { + piA: ReadonlyUint8Array; + piB: Array; + piC: ReadonlyUint8Array; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export function getVerifyInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['piA', fixEncoderSize(getBytesEncoder(), 64)], + ['piB', getArrayEncoder(getU8Encoder(), { size: 128 })], + ['piC', fixEncoderSize(getBytesEncoder(), 64)], + ['imageId', fixEncoderSize(getBytesEncoder(), 32)], + ['journalDigest', fixEncoderSize(getBytesEncoder(), 32)], + ]), + (value) => ({ ...value, discriminator: VERIFY_DISCRIMINATOR }) + ); +} + +export function getVerifyInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['piA', fixDecoderSize(getBytesDecoder(), 64)], + ['piB', getArrayDecoder(getU8Decoder(), { size: 128 })], + ['piC', fixDecoderSize(getBytesDecoder(), 64)], + ['imageId', fixDecoderSize(getBytesDecoder(), 32)], + ['journalDigest', fixDecoderSize(getBytesDecoder(), 32)], + ]); +} + +export function getVerifyInstructionDataCodec(): Codec< + VerifyInstructionDataArgs, + VerifyInstructionData +> { + return combineCodec( + getVerifyInstructionDataEncoder(), + getVerifyInstructionDataDecoder() + ); +} + +export type VerifyInput = { + systemProgram?: Address; + piA: VerifyInstructionDataArgs['piA']; + piB: VerifyInstructionDataArgs['piB']; + piC: VerifyInstructionDataArgs['piC']; + imageId: VerifyInstructionDataArgs['imageId']; + journalDigest: VerifyInstructionDataArgs['journalDigest']; +}; + +export function getVerifyInstruction< + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof GROTH16_VERIFIER_PROGRAM_ADDRESS, +>( + input: VerifyInput, + config?: { programAddress?: TProgramAddress } +): VerifyInstruction { + // Program address. + const programAddress = + config?.programAddress ?? GROTH16_VERIFIER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [getAccountMeta(accounts.systemProgram)], + programAddress, + data: getVerifyInstructionDataEncoder().encode( + args as VerifyInstructionDataArgs + ), + } as VerifyInstruction; + + return instruction; +} + +export type ParsedVerifyInstruction< + TProgram extends string = typeof GROTH16_VERIFIER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + systemProgram: TAccountMetas[0]; + }; + data: VerifyInstructionData; +}; + +export function parseVerifyInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedVerifyInstruction { + if (instruction.accounts.length < 1) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + systemProgram: getNextAccount(), + }, + data: getVerifyInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts new file mode 100644 index 0000000..19299b4 --- /dev/null +++ b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts @@ -0,0 +1,49 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + containsBytes, + fixEncoderSize, + getBytesEncoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { type ParsedVerifyInstruction } from '../instructions'; + +export const GROTH16_VERIFIER_PROGRAM_ADDRESS = + 'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH' as Address<'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH'>; + +export enum Groth16VerifierInstruction { + Verify, +} + +export function identifyGroth16VerifierInstruction( + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): Groth16VerifierInstruction { + const data = 'data' in instruction ? instruction.data : instruction; + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([133, 161, 141, 48, 120, 198, 88, 150]) + ), + 0 + ) + ) { + return Groth16VerifierInstruction.Verify; + } + throw new Error( + 'The provided instruction could not be identified as a groth16Verifier instruction.' + ); +} + +export type ParsedGroth16VerifierInstruction< + TProgram extends string = 'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH', +> = { + instructionType: Groth16VerifierInstruction.Verify; +} & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/groth16/programs/index.ts b/solana-verifier/scripts/groth16/programs/index.ts new file mode 100644 index 0000000..c11c269 --- /dev/null +++ b/solana-verifier/scripts/groth16/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './groth16Verifier'; diff --git a/solana-verifier/scripts/groth16/shared/index.ts b/solana-verifier/scripts/groth16/shared/index.ts new file mode 100644 index 0000000..01a7d93 --- /dev/null +++ b/solana-verifier/scripts/groth16/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/solana-verifier/scripts/loaderV3/index.ts b/solana-verifier/scripts/loaderV3/index.ts new file mode 100644 index 0000000..d69c576 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/index.ts @@ -0,0 +1,10 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './instructions'; +export * from './programs'; diff --git a/solana-verifier/scripts/loaderV3/instructions/close.ts b/solana-verifier/scripts/loaderV3/instructions/close.ts new file mode 100644 index 0000000..d1f4f6a --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/close.ts @@ -0,0 +1,227 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const CLOSE_DISCRIMINATOR = 5; + +export function getCloseDiscriminatorBytes() { + return getU32Encoder().encode(CLOSE_DISCRIMINATOR); +} + +export type CloseInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountBufferOrProgramDataAccount extends + | string + | IAccountMeta = string, + TAccountDestinationAccount extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountProgramAccount extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountBufferOrProgramDataAccount extends string + ? WritableAccount + : TAccountBufferOrProgramDataAccount, + TAccountDestinationAccount extends string + ? WritableAccount + : TAccountDestinationAccount, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountProgramAccount extends string + ? ReadonlyAccount + : TAccountProgramAccount, + ...TRemainingAccounts, + ] + >; + +export type CloseInstructionData = { discriminator: number }; + +export type CloseInstructionDataArgs = {}; + +export function getCloseInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU32Encoder()]]), + (value) => ({ ...value, discriminator: CLOSE_DISCRIMINATOR }) + ); +} + +export function getCloseInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU32Decoder()]]); +} + +export function getCloseInstructionDataCodec(): Codec< + CloseInstructionDataArgs, + CloseInstructionData +> { + return combineCodec( + getCloseInstructionDataEncoder(), + getCloseInstructionDataDecoder() + ); +} + +export type CloseInput< + TAccountBufferOrProgramDataAccount extends string = string, + TAccountDestinationAccount extends string = string, + TAccountAuthority extends string = string, + TAccountProgramAccount extends string = string, +> = { + /** Buffer or ProgramData account to close. */ + bufferOrProgramDataAccount: Address; + /** Destination account for reclaimed lamports. */ + destinationAccount: Address; + /** Authority (optional). */ + authority?: TransactionSigner; + /** Program account (optional). */ + programAccount?: Address; +}; + +export function getCloseInstruction< + TAccountBufferOrProgramDataAccount extends string, + TAccountDestinationAccount extends string, + TAccountAuthority extends string, + TAccountProgramAccount extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: CloseInput< + TAccountBufferOrProgramDataAccount, + TAccountDestinationAccount, + TAccountAuthority, + TAccountProgramAccount + >, + config?: { programAddress?: TProgramAddress } +): CloseInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountDestinationAccount, + TAccountAuthority, + TAccountProgramAccount +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + bufferOrProgramDataAccount: { + value: input.bufferOrProgramDataAccount ?? null, + isWritable: true, + }, + destinationAccount: { + value: input.destinationAccount ?? null, + isWritable: true, + }, + authority: { value: input.authority ?? null, isWritable: false }, + programAccount: { value: input.programAccount ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.bufferOrProgramDataAccount), + getAccountMeta(accounts.destinationAccount), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.programAccount), + ], + programAddress, + data: getCloseInstructionDataEncoder().encode({}), + } as CloseInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountDestinationAccount, + TAccountAuthority, + TAccountProgramAccount + >; + + return instruction; +} + +export type ParsedCloseInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Buffer or ProgramData account to close. */ + bufferOrProgramDataAccount: TAccountMetas[0]; + /** Destination account for reclaimed lamports. */ + destinationAccount: TAccountMetas[1]; + /** Authority (optional). */ + authority?: TAccountMetas[2] | undefined; + /** Program account (optional). */ + programAccount?: TAccountMetas[3] | undefined; + }; + data: CloseInstructionData; +}; + +export function parseCloseInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedCloseInstruction { + if (instruction.accounts.length < 4) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS + ? undefined + : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + bufferOrProgramDataAccount: getNextAccount(), + destinationAccount: getNextAccount(), + authority: getNextOptionalAccount(), + programAccount: getNextOptionalAccount(), + }, + data: getCloseInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/deployWithMaxDataLen.ts b/solana-verifier/scripts/loaderV3/instructions/deployWithMaxDataLen.ts new file mode 100644 index 0000000..5e70fd9 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/deployWithMaxDataLen.ts @@ -0,0 +1,326 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + getU64Decoder, + getU64Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const DEPLOY_WITH_MAX_DATA_LEN_DISCRIMINATOR = 2; + +export function getDeployWithMaxDataLenDiscriminatorBytes() { + return getU32Encoder().encode(DEPLOY_WITH_MAX_DATA_LEN_DISCRIMINATOR); +} + +export type DeployWithMaxDataLenInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountPayerAccount extends string | IAccountMeta = string, + TAccountProgramDataAccount extends string | IAccountMeta = string, + TAccountProgramAccount extends string | IAccountMeta = string, + TAccountBufferAccount extends string | IAccountMeta = string, + TAccountRentSysvar extends + | string + | IAccountMeta = 'SysvarRent111111111111111111111111111111111', + TAccountClockSysvar extends + | string + | IAccountMeta = 'SysvarC1ock11111111111111111111111111111111', + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountPayerAccount extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountPayerAccount, + TAccountProgramDataAccount extends string + ? WritableAccount + : TAccountProgramDataAccount, + TAccountProgramAccount extends string + ? WritableAccount + : TAccountProgramAccount, + TAccountBufferAccount extends string + ? WritableAccount + : TAccountBufferAccount, + TAccountRentSysvar extends string + ? ReadonlyAccount + : TAccountRentSysvar, + TAccountClockSysvar extends string + ? ReadonlyAccount + : TAccountClockSysvar, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type DeployWithMaxDataLenInstructionData = { + discriminator: number; + maxDataLen: bigint; +}; + +export type DeployWithMaxDataLenInstructionDataArgs = { + maxDataLen: number | bigint; +}; + +export function getDeployWithMaxDataLenInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU32Encoder()], + ['maxDataLen', getU64Encoder()], + ]), + (value) => ({ + ...value, + discriminator: DEPLOY_WITH_MAX_DATA_LEN_DISCRIMINATOR, + }) + ); +} + +export function getDeployWithMaxDataLenInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU32Decoder()], + ['maxDataLen', getU64Decoder()], + ]); +} + +export function getDeployWithMaxDataLenInstructionDataCodec(): Codec< + DeployWithMaxDataLenInstructionDataArgs, + DeployWithMaxDataLenInstructionData +> { + return combineCodec( + getDeployWithMaxDataLenInstructionDataEncoder(), + getDeployWithMaxDataLenInstructionDataDecoder() + ); +} + +export type DeployWithMaxDataLenInput< + TAccountPayerAccount extends string = string, + TAccountProgramDataAccount extends string = string, + TAccountProgramAccount extends string = string, + TAccountBufferAccount extends string = string, + TAccountRentSysvar extends string = string, + TAccountClockSysvar extends string = string, + TAccountSystemProgram extends string = string, + TAccountAuthority extends string = string, +> = { + /** Payer account that will pay to create the ProgramData account. */ + payerAccount: TransactionSigner; + /** ProgramData account (uninitialized). */ + programDataAccount: Address; + /** Program account (uninitialized). */ + programAccount: Address; + /** Buffer account where the program data has been written. */ + bufferAccount: Address; + /** Rent sysvar. */ + rentSysvar?: Address; + /** Clock sysvar. */ + clockSysvar?: Address; + /** System program. */ + systemProgram?: Address; + /** Authority. */ + authority: TransactionSigner; + maxDataLen: DeployWithMaxDataLenInstructionDataArgs['maxDataLen']; +}; + +export function getDeployWithMaxDataLenInstruction< + TAccountPayerAccount extends string, + TAccountProgramDataAccount extends string, + TAccountProgramAccount extends string, + TAccountBufferAccount extends string, + TAccountRentSysvar extends string, + TAccountClockSysvar extends string, + TAccountSystemProgram extends string, + TAccountAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: DeployWithMaxDataLenInput< + TAccountPayerAccount, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountSystemProgram, + TAccountAuthority + >, + config?: { programAddress?: TProgramAddress } +): DeployWithMaxDataLenInstruction< + TProgramAddress, + TAccountPayerAccount, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountSystemProgram, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + payerAccount: { value: input.payerAccount ?? null, isWritable: true }, + programDataAccount: { + value: input.programDataAccount ?? null, + isWritable: true, + }, + programAccount: { value: input.programAccount ?? null, isWritable: true }, + bufferAccount: { value: input.bufferAccount ?? null, isWritable: true }, + rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }, + clockSysvar: { value: input.clockSysvar ?? null, isWritable: false }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + authority: { value: input.authority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.rentSysvar.value) { + accounts.rentSysvar.value = + 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>; + } + if (!accounts.clockSysvar.value) { + accounts.clockSysvar.value = + 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>; + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.payerAccount), + getAccountMeta(accounts.programDataAccount), + getAccountMeta(accounts.programAccount), + getAccountMeta(accounts.bufferAccount), + getAccountMeta(accounts.rentSysvar), + getAccountMeta(accounts.clockSysvar), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getDeployWithMaxDataLenInstructionDataEncoder().encode( + args as DeployWithMaxDataLenInstructionDataArgs + ), + } as DeployWithMaxDataLenInstruction< + TProgramAddress, + TAccountPayerAccount, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountSystemProgram, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedDeployWithMaxDataLenInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Payer account that will pay to create the ProgramData account. */ + payerAccount: TAccountMetas[0]; + /** ProgramData account (uninitialized). */ + programDataAccount: TAccountMetas[1]; + /** Program account (uninitialized). */ + programAccount: TAccountMetas[2]; + /** Buffer account where the program data has been written. */ + bufferAccount: TAccountMetas[3]; + /** Rent sysvar. */ + rentSysvar: TAccountMetas[4]; + /** Clock sysvar. */ + clockSysvar: TAccountMetas[5]; + /** System program. */ + systemProgram: TAccountMetas[6]; + /** Authority. */ + authority: TAccountMetas[7]; + }; + data: DeployWithMaxDataLenInstructionData; +}; + +export function parseDeployWithMaxDataLenInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedDeployWithMaxDataLenInstruction { + if (instruction.accounts.length < 8) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + payerAccount: getNextAccount(), + programDataAccount: getNextAccount(), + programAccount: getNextAccount(), + bufferAccount: getNextAccount(), + rentSysvar: getNextAccount(), + clockSysvar: getNextAccount(), + systemProgram: getNextAccount(), + authority: getNextAccount(), + }, + data: getDeployWithMaxDataLenInstructionDataDecoder().decode( + instruction.data + ), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/extendProgram.ts b/solana-verifier/scripts/loaderV3/instructions/extendProgram.ts new file mode 100644 index 0000000..cb1c481 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/extendProgram.ts @@ -0,0 +1,237 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const EXTEND_PROGRAM_DISCRIMINATOR = 6; + +export function getExtendProgramDiscriminatorBytes() { + return getU32Encoder().encode(EXTEND_PROGRAM_DISCRIMINATOR); +} + +export type ExtendProgramInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountProgramDataAccount extends string | IAccountMeta = string, + TAccountProgramAccount extends string | IAccountMeta = string, + TAccountSystemProgram extends string | IAccountMeta = string, + TAccountPayer extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgramDataAccount extends string + ? WritableAccount + : TAccountProgramDataAccount, + TAccountProgramAccount extends string + ? WritableAccount + : TAccountProgramAccount, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + TAccountPayer extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountPayer, + ...TRemainingAccounts, + ] + >; + +export type ExtendProgramInstructionData = { + discriminator: number; + additionalBytes: number; +}; + +export type ExtendProgramInstructionDataArgs = { additionalBytes: number }; + +export function getExtendProgramInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU32Encoder()], + ['additionalBytes', getU32Encoder()], + ]), + (value) => ({ ...value, discriminator: EXTEND_PROGRAM_DISCRIMINATOR }) + ); +} + +export function getExtendProgramInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU32Decoder()], + ['additionalBytes', getU32Decoder()], + ]); +} + +export function getExtendProgramInstructionDataCodec(): Codec< + ExtendProgramInstructionDataArgs, + ExtendProgramInstructionData +> { + return combineCodec( + getExtendProgramInstructionDataEncoder(), + getExtendProgramInstructionDataDecoder() + ); +} + +export type ExtendProgramInput< + TAccountProgramDataAccount extends string = string, + TAccountProgramAccount extends string = string, + TAccountSystemProgram extends string = string, + TAccountPayer extends string = string, +> = { + /** ProgramData account. */ + programDataAccount: Address; + /** Program account. */ + programAccount: Address; + /** System program (optional). */ + systemProgram?: Address; + /** Payer. */ + payer?: TransactionSigner; + additionalBytes: ExtendProgramInstructionDataArgs['additionalBytes']; +}; + +export function getExtendProgramInstruction< + TAccountProgramDataAccount extends string, + TAccountProgramAccount extends string, + TAccountSystemProgram extends string, + TAccountPayer extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: ExtendProgramInput< + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountSystemProgram, + TAccountPayer + >, + config?: { programAddress?: TProgramAddress } +): ExtendProgramInstruction< + TProgramAddress, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountSystemProgram, + TAccountPayer +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + programDataAccount: { + value: input.programDataAccount ?? null, + isWritable: true, + }, + programAccount: { value: input.programAccount ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + payer: { value: input.payer ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.programDataAccount), + getAccountMeta(accounts.programAccount), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.payer), + ], + programAddress, + data: getExtendProgramInstructionDataEncoder().encode( + args as ExtendProgramInstructionDataArgs + ), + } as ExtendProgramInstruction< + TProgramAddress, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountSystemProgram, + TAccountPayer + >; + + return instruction; +} + +export type ParsedExtendProgramInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** ProgramData account. */ + programDataAccount: TAccountMetas[0]; + /** Program account. */ + programAccount: TAccountMetas[1]; + /** System program (optional). */ + systemProgram?: TAccountMetas[2] | undefined; + /** Payer. */ + payer?: TAccountMetas[3] | undefined; + }; + data: ExtendProgramInstructionData; +}; + +export function parseExtendProgramInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedExtendProgramInstruction { + if (instruction.accounts.length < 4) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS + ? undefined + : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + programDataAccount: getNextAccount(), + programAccount: getNextAccount(), + systemProgram: getNextOptionalAccount(), + payer: getNextOptionalAccount(), + }, + data: getExtendProgramInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/index.ts b/solana-verifier/scripts/loaderV3/instructions/index.ts new file mode 100644 index 0000000..b9a9b1d --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/index.ts @@ -0,0 +1,16 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './close'; +export * from './deployWithMaxDataLen'; +export * from './extendProgram'; +export * from './initializeBuffer'; +export * from './setAuthority'; +export * from './setAuthorityChecked'; +export * from './upgrade'; +export * from './write'; diff --git a/solana-verifier/scripts/loaderV3/instructions/initializeBuffer.ts b/solana-verifier/scripts/loaderV3/instructions/initializeBuffer.ts new file mode 100644 index 0000000..0e53343 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/initializeBuffer.ts @@ -0,0 +1,177 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const INITIALIZE_BUFFER_DISCRIMINATOR = 0; + +export function getInitializeBufferDiscriminatorBytes() { + return getU32Encoder().encode(INITIALIZE_BUFFER_DISCRIMINATOR); +} + +export type InitializeBufferInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountSourceAccount extends string | IAccountMeta = string, + TAccountBufferAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountSourceAccount extends string + ? WritableAccount + : TAccountSourceAccount, + TAccountBufferAuthority extends string + ? ReadonlyAccount + : TAccountBufferAuthority, + ...TRemainingAccounts, + ] + >; + +export type InitializeBufferInstructionData = { discriminator: number }; + +export type InitializeBufferInstructionDataArgs = {}; + +export function getInitializeBufferInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU32Encoder()]]), + (value) => ({ ...value, discriminator: INITIALIZE_BUFFER_DISCRIMINATOR }) + ); +} + +export function getInitializeBufferInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU32Decoder()]]); +} + +export function getInitializeBufferInstructionDataCodec(): Codec< + InitializeBufferInstructionDataArgs, + InitializeBufferInstructionData +> { + return combineCodec( + getInitializeBufferInstructionDataEncoder(), + getInitializeBufferInstructionDataDecoder() + ); +} + +export type InitializeBufferInput< + TAccountSourceAccount extends string = string, + TAccountBufferAuthority extends string = string, +> = { + /** Source account to initialize. */ + sourceAccount: Address; + /** Buffer authority. */ + bufferAuthority: Address; +}; + +export function getInitializeBufferInstruction< + TAccountSourceAccount extends string, + TAccountBufferAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: InitializeBufferInput, + config?: { programAddress?: TProgramAddress } +): InitializeBufferInstruction< + TProgramAddress, + TAccountSourceAccount, + TAccountBufferAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + sourceAccount: { value: input.sourceAccount ?? null, isWritable: true }, + bufferAuthority: { + value: input.bufferAuthority ?? null, + isWritable: false, + }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.sourceAccount), + getAccountMeta(accounts.bufferAuthority), + ], + programAddress, + data: getInitializeBufferInstructionDataEncoder().encode({}), + } as InitializeBufferInstruction< + TProgramAddress, + TAccountSourceAccount, + TAccountBufferAuthority + >; + + return instruction; +} + +export type ParsedInitializeBufferInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Source account to initialize. */ + sourceAccount: TAccountMetas[0]; + /** Buffer authority. */ + bufferAuthority: TAccountMetas[1]; + }; + data: InitializeBufferInstructionData; +}; + +export function parseInitializeBufferInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedInitializeBufferInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + sourceAccount: getNextAccount(), + bufferAuthority: getNextAccount(), + }, + data: getInitializeBufferInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/setAuthority.ts b/solana-verifier/scripts/loaderV3/instructions/setAuthority.ts new file mode 100644 index 0000000..52341a3 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/setAuthority.ts @@ -0,0 +1,211 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const SET_AUTHORITY_DISCRIMINATOR = 4; + +export function getSetAuthorityDiscriminatorBytes() { + return getU32Encoder().encode(SET_AUTHORITY_DISCRIMINATOR); +} + +export type SetAuthorityInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountBufferOrProgramDataAccount extends + | string + | IAccountMeta = string, + TAccountCurrentAuthority extends string | IAccountMeta = string, + TAccountNewAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountBufferOrProgramDataAccount extends string + ? WritableAccount + : TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountCurrentAuthority, + TAccountNewAuthority extends string + ? ReadonlyAccount + : TAccountNewAuthority, + ...TRemainingAccounts, + ] + >; + +export type SetAuthorityInstructionData = { discriminator: number }; + +export type SetAuthorityInstructionDataArgs = {}; + +export function getSetAuthorityInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU32Encoder()]]), + (value) => ({ ...value, discriminator: SET_AUTHORITY_DISCRIMINATOR }) + ); +} + +export function getSetAuthorityInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU32Decoder()]]); +} + +export function getSetAuthorityInstructionDataCodec(): Codec< + SetAuthorityInstructionDataArgs, + SetAuthorityInstructionData +> { + return combineCodec( + getSetAuthorityInstructionDataEncoder(), + getSetAuthorityInstructionDataDecoder() + ); +} + +export type SetAuthorityInput< + TAccountBufferOrProgramDataAccount extends string = string, + TAccountCurrentAuthority extends string = string, + TAccountNewAuthority extends string = string, +> = { + /** Buffer or ProgramData account. */ + bufferOrProgramDataAccount: Address; + /** Current authority. */ + currentAuthority: TransactionSigner; + /** New authority (optional). */ + newAuthority?: Address; +}; + +export function getSetAuthorityInstruction< + TAccountBufferOrProgramDataAccount extends string, + TAccountCurrentAuthority extends string, + TAccountNewAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: SetAuthorityInput< + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority + >, + config?: { programAddress?: TProgramAddress } +): SetAuthorityInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + bufferOrProgramDataAccount: { + value: input.bufferOrProgramDataAccount ?? null, + isWritable: true, + }, + currentAuthority: { + value: input.currentAuthority ?? null, + isWritable: false, + }, + newAuthority: { value: input.newAuthority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.bufferOrProgramDataAccount), + getAccountMeta(accounts.currentAuthority), + getAccountMeta(accounts.newAuthority), + ], + programAddress, + data: getSetAuthorityInstructionDataEncoder().encode({}), + } as SetAuthorityInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority + >; + + return instruction; +} + +export type ParsedSetAuthorityInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Buffer or ProgramData account. */ + bufferOrProgramDataAccount: TAccountMetas[0]; + /** Current authority. */ + currentAuthority: TAccountMetas[1]; + /** New authority (optional). */ + newAuthority?: TAccountMetas[2] | undefined; + }; + data: SetAuthorityInstructionData; +}; + +export function parseSetAuthorityInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedSetAuthorityInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS + ? undefined + : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + bufferOrProgramDataAccount: getNextAccount(), + currentAuthority: getNextAccount(), + newAuthority: getNextOptionalAccount(), + }, + data: getSetAuthorityInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/setAuthorityChecked.ts b/solana-verifier/scripts/loaderV3/instructions/setAuthorityChecked.ts new file mode 100644 index 0000000..30ed5a8 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/setAuthorityChecked.ts @@ -0,0 +1,210 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const SET_AUTHORITY_CHECKED_DISCRIMINATOR = 7; + +export function getSetAuthorityCheckedDiscriminatorBytes() { + return getU32Encoder().encode(SET_AUTHORITY_CHECKED_DISCRIMINATOR); +} + +export type SetAuthorityCheckedInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountBufferOrProgramDataAccount extends + | string + | IAccountMeta = string, + TAccountCurrentAuthority extends string | IAccountMeta = string, + TAccountNewAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountBufferOrProgramDataAccount extends string + ? WritableAccount + : TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountCurrentAuthority, + TAccountNewAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountNewAuthority, + ...TRemainingAccounts, + ] + >; + +export type SetAuthorityCheckedInstructionData = { discriminator: number }; + +export type SetAuthorityCheckedInstructionDataArgs = {}; + +export function getSetAuthorityCheckedInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU32Encoder()]]), + (value) => ({ + ...value, + discriminator: SET_AUTHORITY_CHECKED_DISCRIMINATOR, + }) + ); +} + +export function getSetAuthorityCheckedInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU32Decoder()]]); +} + +export function getSetAuthorityCheckedInstructionDataCodec(): Codec< + SetAuthorityCheckedInstructionDataArgs, + SetAuthorityCheckedInstructionData +> { + return combineCodec( + getSetAuthorityCheckedInstructionDataEncoder(), + getSetAuthorityCheckedInstructionDataDecoder() + ); +} + +export type SetAuthorityCheckedInput< + TAccountBufferOrProgramDataAccount extends string = string, + TAccountCurrentAuthority extends string = string, + TAccountNewAuthority extends string = string, +> = { + /** Buffer or ProgramData account to change the authority of. */ + bufferOrProgramDataAccount: Address; + /** Current authority. */ + currentAuthority: TransactionSigner; + /** New authority. */ + newAuthority: TransactionSigner; +}; + +export function getSetAuthorityCheckedInstruction< + TAccountBufferOrProgramDataAccount extends string, + TAccountCurrentAuthority extends string, + TAccountNewAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: SetAuthorityCheckedInput< + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority + >, + config?: { programAddress?: TProgramAddress } +): SetAuthorityCheckedInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + bufferOrProgramDataAccount: { + value: input.bufferOrProgramDataAccount ?? null, + isWritable: true, + }, + currentAuthority: { + value: input.currentAuthority ?? null, + isWritable: false, + }, + newAuthority: { value: input.newAuthority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.bufferOrProgramDataAccount), + getAccountMeta(accounts.currentAuthority), + getAccountMeta(accounts.newAuthority), + ], + programAddress, + data: getSetAuthorityCheckedInstructionDataEncoder().encode({}), + } as SetAuthorityCheckedInstruction< + TProgramAddress, + TAccountBufferOrProgramDataAccount, + TAccountCurrentAuthority, + TAccountNewAuthority + >; + + return instruction; +} + +export type ParsedSetAuthorityCheckedInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Buffer or ProgramData account to change the authority of. */ + bufferOrProgramDataAccount: TAccountMetas[0]; + /** Current authority. */ + currentAuthority: TAccountMetas[1]; + /** New authority. */ + newAuthority: TAccountMetas[2]; + }; + data: SetAuthorityCheckedInstructionData; +}; + +export function parseSetAuthorityCheckedInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedSetAuthorityCheckedInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + bufferOrProgramDataAccount: getNextAccount(), + currentAuthority: getNextAccount(), + newAuthority: getNextAccount(), + }, + data: getSetAuthorityCheckedInstructionDataDecoder().decode( + instruction.data + ), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/upgrade.ts b/solana-verifier/scripts/loaderV3/instructions/upgrade.ts new file mode 100644 index 0000000..7578d1d --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/upgrade.ts @@ -0,0 +1,278 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const UPGRADE_DISCRIMINATOR = 3; + +export function getUpgradeDiscriminatorBytes() { + return getU32Encoder().encode(UPGRADE_DISCRIMINATOR); +} + +export type UpgradeInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountProgramDataAccount extends string | IAccountMeta = string, + TAccountProgramAccount extends string | IAccountMeta = string, + TAccountBufferAccount extends string | IAccountMeta = string, + TAccountSpillAccount extends string | IAccountMeta = string, + TAccountRentSysvar extends + | string + | IAccountMeta = 'SysvarRent111111111111111111111111111111111', + TAccountClockSysvar extends + | string + | IAccountMeta = 'SysvarC1ock11111111111111111111111111111111', + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgramDataAccount extends string + ? WritableAccount + : TAccountProgramDataAccount, + TAccountProgramAccount extends string + ? WritableAccount + : TAccountProgramAccount, + TAccountBufferAccount extends string + ? WritableAccount + : TAccountBufferAccount, + TAccountSpillAccount extends string + ? WritableAccount + : TAccountSpillAccount, + TAccountRentSysvar extends string + ? ReadonlyAccount + : TAccountRentSysvar, + TAccountClockSysvar extends string + ? ReadonlyAccount + : TAccountClockSysvar, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type UpgradeInstructionData = { discriminator: number }; + +export type UpgradeInstructionDataArgs = {}; + +export function getUpgradeInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU32Encoder()]]), + (value) => ({ ...value, discriminator: UPGRADE_DISCRIMINATOR }) + ); +} + +export function getUpgradeInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU32Decoder()]]); +} + +export function getUpgradeInstructionDataCodec(): Codec< + UpgradeInstructionDataArgs, + UpgradeInstructionData +> { + return combineCodec( + getUpgradeInstructionDataEncoder(), + getUpgradeInstructionDataDecoder() + ); +} + +export type UpgradeInput< + TAccountProgramDataAccount extends string = string, + TAccountProgramAccount extends string = string, + TAccountBufferAccount extends string = string, + TAccountSpillAccount extends string = string, + TAccountRentSysvar extends string = string, + TAccountClockSysvar extends string = string, + TAccountAuthority extends string = string, +> = { + /** ProgramData account. */ + programDataAccount: Address; + /** Program account. */ + programAccount: Address; + /** Buffer account where the new program data has been written. */ + bufferAccount: Address; + /** Spill account. */ + spillAccount: Address; + /** Rent sysvar. */ + rentSysvar?: Address; + /** Clock sysvar. */ + clockSysvar?: Address; + /** Authority. */ + authority: TransactionSigner; +}; + +export function getUpgradeInstruction< + TAccountProgramDataAccount extends string, + TAccountProgramAccount extends string, + TAccountBufferAccount extends string, + TAccountSpillAccount extends string, + TAccountRentSysvar extends string, + TAccountClockSysvar extends string, + TAccountAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: UpgradeInput< + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountSpillAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountAuthority + >, + config?: { programAddress?: TProgramAddress } +): UpgradeInstruction< + TProgramAddress, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountSpillAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + programDataAccount: { + value: input.programDataAccount ?? null, + isWritable: true, + }, + programAccount: { value: input.programAccount ?? null, isWritable: true }, + bufferAccount: { value: input.bufferAccount ?? null, isWritable: true }, + spillAccount: { value: input.spillAccount ?? null, isWritable: true }, + rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }, + clockSysvar: { value: input.clockSysvar ?? null, isWritable: false }, + authority: { value: input.authority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Resolve default values. + if (!accounts.rentSysvar.value) { + accounts.rentSysvar.value = + 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>; + } + if (!accounts.clockSysvar.value) { + accounts.clockSysvar.value = + 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.programDataAccount), + getAccountMeta(accounts.programAccount), + getAccountMeta(accounts.bufferAccount), + getAccountMeta(accounts.spillAccount), + getAccountMeta(accounts.rentSysvar), + getAccountMeta(accounts.clockSysvar), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getUpgradeInstructionDataEncoder().encode({}), + } as UpgradeInstruction< + TProgramAddress, + TAccountProgramDataAccount, + TAccountProgramAccount, + TAccountBufferAccount, + TAccountSpillAccount, + TAccountRentSysvar, + TAccountClockSysvar, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedUpgradeInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** ProgramData account. */ + programDataAccount: TAccountMetas[0]; + /** Program account. */ + programAccount: TAccountMetas[1]; + /** Buffer account where the new program data has been written. */ + bufferAccount: TAccountMetas[2]; + /** Spill account. */ + spillAccount: TAccountMetas[3]; + /** Rent sysvar. */ + rentSysvar: TAccountMetas[4]; + /** Clock sysvar. */ + clockSysvar: TAccountMetas[5]; + /** Authority. */ + authority: TAccountMetas[6]; + }; + data: UpgradeInstructionData; +}; + +export function parseUpgradeInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedUpgradeInstruction { + if (instruction.accounts.length < 7) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + programDataAccount: getNextAccount(), + programAccount: getNextAccount(), + bufferAccount: getNextAccount(), + spillAccount: getNextAccount(), + rentSysvar: getNextAccount(), + clockSysvar: getNextAccount(), + authority: getNextAccount(), + }, + data: getUpgradeInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/instructions/write.ts b/solana-verifier/scripts/loaderV3/instructions/write.ts new file mode 100644 index 0000000..b27c786 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/instructions/write.ts @@ -0,0 +1,207 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + addDecoderSizePrefix, + addEncoderSizePrefix, + combineCodec, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const WRITE_DISCRIMINATOR = 1; + +export function getWriteDiscriminatorBytes() { + return getU32Encoder().encode(WRITE_DISCRIMINATOR); +} + +export type WriteInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountBufferAccount extends string | IAccountMeta = string, + TAccountBufferAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountBufferAccount extends string + ? WritableAccount + : TAccountBufferAccount, + TAccountBufferAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountBufferAuthority, + ...TRemainingAccounts, + ] + >; + +export type WriteInstructionData = { + discriminator: number; + offset: number; + bytes: ReadonlyUint8Array; +}; + +export type WriteInstructionDataArgs = { + offset: number; + bytes: ReadonlyUint8Array; +}; + +export function getWriteInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU32Encoder()], + ['offset', getU32Encoder()], + ['bytes', addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())], + ]), + (value) => ({ ...value, discriminator: WRITE_DISCRIMINATOR }) + ); +} + +export function getWriteInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU32Decoder()], + ['offset', getU32Decoder()], + ['bytes', addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())], + ]); +} + +export function getWriteInstructionDataCodec(): Codec< + WriteInstructionDataArgs, + WriteInstructionData +> { + return combineCodec( + getWriteInstructionDataEncoder(), + getWriteInstructionDataDecoder() + ); +} + +export type WriteInput< + TAccountBufferAccount extends string = string, + TAccountBufferAuthority extends string = string, +> = { + /** Buffer account. */ + bufferAccount: Address; + /** Buffer authority. */ + bufferAuthority: TransactionSigner; + offset: WriteInstructionDataArgs['offset']; + bytes: WriteInstructionDataArgs['bytes']; +}; + +export function getWriteInstruction< + TAccountBufferAccount extends string, + TAccountBufferAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +>( + input: WriteInput, + config?: { programAddress?: TProgramAddress } +): WriteInstruction< + TProgramAddress, + TAccountBufferAccount, + TAccountBufferAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + bufferAccount: { value: input.bufferAccount ?? null, isWritable: true }, + bufferAuthority: { + value: input.bufferAuthority ?? null, + isWritable: false, + }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.bufferAccount), + getAccountMeta(accounts.bufferAuthority), + ], + programAddress, + data: getWriteInstructionDataEncoder().encode( + args as WriteInstructionDataArgs + ), + } as WriteInstruction< + TProgramAddress, + TAccountBufferAccount, + TAccountBufferAuthority + >; + + return instruction; +} + +export type ParsedWriteInstruction< + TProgram extends string = typeof SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Buffer account. */ + bufferAccount: TAccountMetas[0]; + /** Buffer authority. */ + bufferAuthority: TAccountMetas[1]; + }; + data: WriteInstructionData; +}; + +export function parseWriteInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedWriteInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + bufferAccount: getNextAccount(), + bufferAuthority: getNextAccount(), + }, + data: getWriteInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV3/programs/index.ts b/solana-verifier/scripts/loaderV3/programs/index.ts new file mode 100644 index 0000000..8318df0 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './solanaLoaderV3Program'; diff --git a/solana-verifier/scripts/loaderV3/programs/solanaLoaderV3Program.ts b/solana-verifier/scripts/loaderV3/programs/solanaLoaderV3Program.ts new file mode 100644 index 0000000..39900dc --- /dev/null +++ b/solana-verifier/scripts/loaderV3/programs/solanaLoaderV3Program.ts @@ -0,0 +1,99 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + containsBytes, + getU32Encoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { + type ParsedCloseInstruction, + type ParsedDeployWithMaxDataLenInstruction, + type ParsedExtendProgramInstruction, + type ParsedInitializeBufferInstruction, + type ParsedSetAuthorityCheckedInstruction, + type ParsedSetAuthorityInstruction, + type ParsedUpgradeInstruction, + type ParsedWriteInstruction, +} from '../instructions'; + +export const SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS = + 'BPFLoaderUpgradeab1e11111111111111111111111' as Address<'BPFLoaderUpgradeab1e11111111111111111111111'>; + +export enum SolanaLoaderV3ProgramInstruction { + InitializeBuffer, + Write, + DeployWithMaxDataLen, + Upgrade, + SetAuthority, + Close, + ExtendProgram, + SetAuthorityChecked, +} + +export function identifySolanaLoaderV3ProgramInstruction( + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): SolanaLoaderV3ProgramInstruction { + const data = 'data' in instruction ? instruction.data : instruction; + if (containsBytes(data, getU32Encoder().encode(0), 0)) { + return SolanaLoaderV3ProgramInstruction.InitializeBuffer; + } + if (containsBytes(data, getU32Encoder().encode(1), 0)) { + return SolanaLoaderV3ProgramInstruction.Write; + } + if (containsBytes(data, getU32Encoder().encode(2), 0)) { + return SolanaLoaderV3ProgramInstruction.DeployWithMaxDataLen; + } + if (containsBytes(data, getU32Encoder().encode(3), 0)) { + return SolanaLoaderV3ProgramInstruction.Upgrade; + } + if (containsBytes(data, getU32Encoder().encode(4), 0)) { + return SolanaLoaderV3ProgramInstruction.SetAuthority; + } + if (containsBytes(data, getU32Encoder().encode(5), 0)) { + return SolanaLoaderV3ProgramInstruction.Close; + } + if (containsBytes(data, getU32Encoder().encode(6), 0)) { + return SolanaLoaderV3ProgramInstruction.ExtendProgram; + } + if (containsBytes(data, getU32Encoder().encode(7), 0)) { + return SolanaLoaderV3ProgramInstruction.SetAuthorityChecked; + } + throw new Error( + 'The provided instruction could not be identified as a solanaLoaderV3Program instruction.' + ); +} + +export type ParsedSolanaLoaderV3ProgramInstruction< + TProgram extends string = 'BPFLoaderUpgradeab1e11111111111111111111111', +> = + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.InitializeBuffer; + } & ParsedInitializeBufferInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.Write; + } & ParsedWriteInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.DeployWithMaxDataLen; + } & ParsedDeployWithMaxDataLenInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.Upgrade; + } & ParsedUpgradeInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.SetAuthority; + } & ParsedSetAuthorityInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.Close; + } & ParsedCloseInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.ExtendProgram; + } & ParsedExtendProgramInstruction) + | ({ + instructionType: SolanaLoaderV3ProgramInstruction.SetAuthorityChecked; + } & ParsedSetAuthorityCheckedInstruction); diff --git a/solana-verifier/scripts/loaderV3/shared/index.ts b/solana-verifier/scripts/loaderV3/shared/index.ts new file mode 100644 index 0000000..01a7d93 --- /dev/null +++ b/solana-verifier/scripts/loaderV3/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/solana-verifier/scripts/loaderV4/index.ts b/solana-verifier/scripts/loaderV4/index.ts new file mode 100644 index 0000000..d69c576 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/index.ts @@ -0,0 +1,10 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './instructions'; +export * from './programs'; diff --git a/solana-verifier/scripts/loaderV4/instructions/deploy.ts b/solana-verifier/scripts/loaderV4/instructions/deploy.ts new file mode 100644 index 0000000..2bef413 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/deploy.ts @@ -0,0 +1,198 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const DEPLOY_DISCRIMINATOR = 2; + +export function getDeployDiscriminatorBytes() { + return getU8Encoder().encode(DEPLOY_DISCRIMINATOR); +} + +export type DeployInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountSource extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableAccount + : TAccountProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountSource extends string + ? WritableAccount + : TAccountSource, + ...TRemainingAccounts, + ] + >; + +export type DeployInstructionData = { discriminator: number }; + +export type DeployInstructionDataArgs = {}; + +export function getDeployInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU8Encoder()]]), + (value) => ({ ...value, discriminator: DEPLOY_DISCRIMINATOR }) + ); +} + +export function getDeployInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU8Decoder()]]); +} + +export function getDeployInstructionDataCodec(): Codec< + DeployInstructionDataArgs, + DeployInstructionData +> { + return combineCodec( + getDeployInstructionDataEncoder(), + getDeployInstructionDataDecoder() + ); +} + +export type DeployInput< + TAccountProgram extends string = string, + TAccountAuthority extends string = string, + TAccountSource extends string = string, +> = { + /** Program account to deploy. */ + program: Address; + /** Program authority. */ + authority: TransactionSigner; + /** Undeployed source program account to take data and lamports from (optional). */ + source?: Address; +}; + +export function getDeployInstruction< + TAccountProgram extends string, + TAccountAuthority extends string, + TAccountSource extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: DeployInput, + config?: { programAddress?: TProgramAddress } +): DeployInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountSource +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + source: { value: input.source ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.source), + ], + programAddress, + data: getDeployInstructionDataEncoder().encode({}), + } as DeployInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountSource + >; + + return instruction; +} + +export type ParsedDeployInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to deploy. */ + program: TAccountMetas[0]; + /** Program authority. */ + authority: TAccountMetas[1]; + /** Undeployed source program account to take data and lamports from (optional). */ + source?: TAccountMetas[2] | undefined; + }; + data: DeployInstructionData; +}; + +export function parseDeployInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedDeployInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS + ? undefined + : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + authority: getNextAccount(), + source: getNextOptionalAccount(), + }, + data: getDeployInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/instructions/finalize.ts b/solana-verifier/scripts/loaderV4/instructions/finalize.ts new file mode 100644 index 0000000..a2505d8 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/finalize.ts @@ -0,0 +1,193 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const FINALIZE_DISCRIMINATOR = 5; + +export function getFinalizeDiscriminatorBytes() { + return getU8Encoder().encode(FINALIZE_DISCRIMINATOR); +} + +export type FinalizeInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountNextVersion extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableAccount + : TAccountProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountNextVersion extends string + ? ReadonlyAccount + : TAccountNextVersion, + ...TRemainingAccounts, + ] + >; + +export type FinalizeInstructionData = { discriminator: number }; + +export type FinalizeInstructionDataArgs = {}; + +export function getFinalizeInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU8Encoder()]]), + (value) => ({ ...value, discriminator: FINALIZE_DISCRIMINATOR }) + ); +} + +export function getFinalizeInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU8Decoder()]]); +} + +export function getFinalizeInstructionDataCodec(): Codec< + FinalizeInstructionDataArgs, + FinalizeInstructionData +> { + return combineCodec( + getFinalizeInstructionDataEncoder(), + getFinalizeInstructionDataDecoder() + ); +} + +export type FinalizeInput< + TAccountProgram extends string = string, + TAccountAuthority extends string = string, + TAccountNextVersion extends string = string, +> = { + /** Program account to finalize. */ + program: Address; + /** Program authority. */ + authority: TransactionSigner; + /** The next version of the program (can be itself). */ + nextVersion: Address; +}; + +export function getFinalizeInstruction< + TAccountProgram extends string, + TAccountAuthority extends string, + TAccountNextVersion extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: FinalizeInput, + config?: { programAddress?: TProgramAddress } +): FinalizeInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountNextVersion +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + nextVersion: { value: input.nextVersion ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.nextVersion), + ], + programAddress, + data: getFinalizeInstructionDataEncoder().encode({}), + } as FinalizeInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountNextVersion + >; + + return instruction; +} + +export type ParsedFinalizeInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to finalize. */ + program: TAccountMetas[0]; + /** Program authority. */ + authority: TAccountMetas[1]; + /** The next version of the program (can be itself). */ + nextVersion: TAccountMetas[2]; + }; + data: FinalizeInstructionData; +}; + +export function parseFinalizeInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedFinalizeInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + authority: getNextAccount(), + nextVersion: getNextAccount(), + }, + data: getFinalizeInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/instructions/index.ts b/solana-verifier/scripts/loaderV4/instructions/index.ts new file mode 100644 index 0000000..a12eb18 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/index.ts @@ -0,0 +1,14 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './deploy'; +export * from './finalize'; +export * from './retract'; +export * from './transferAuthority'; +export * from './truncate'; +export * from './write'; diff --git a/solana-verifier/scripts/loaderV4/instructions/retract.ts b/solana-verifier/scripts/loaderV4/instructions/retract.ts new file mode 100644 index 0000000..996f93b --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/retract.ts @@ -0,0 +1,169 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const RETRACT_DISCRIMINATOR = 3; + +export function getRetractDiscriminatorBytes() { + return getU8Encoder().encode(RETRACT_DISCRIMINATOR); +} + +export type RetractInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableAccount + : TAccountProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type RetractInstructionData = { discriminator: number }; + +export type RetractInstructionDataArgs = {}; + +export function getRetractInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU8Encoder()]]), + (value) => ({ ...value, discriminator: RETRACT_DISCRIMINATOR }) + ); +} + +export function getRetractInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU8Decoder()]]); +} + +export function getRetractInstructionDataCodec(): Codec< + RetractInstructionDataArgs, + RetractInstructionData +> { + return combineCodec( + getRetractInstructionDataEncoder(), + getRetractInstructionDataDecoder() + ); +} + +export type RetractInput< + TAccountProgram extends string = string, + TAccountAuthority extends string = string, +> = { + /** Program account to retract. */ + program: Address; + /** Program authority. */ + authority: TransactionSigner; +}; + +export function getRetractInstruction< + TAccountProgram extends string, + TAccountAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: RetractInput, + config?: { programAddress?: TProgramAddress } +): RetractInstruction { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getRetractInstructionDataEncoder().encode({}), + } as RetractInstruction; + + return instruction; +} + +export type ParsedRetractInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to retract. */ + program: TAccountMetas[0]; + /** Program authority. */ + authority: TAccountMetas[1]; + }; + data: RetractInstructionData; +}; + +export function parseRetractInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedRetractInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + authority: getNextAccount(), + }, + data: getRetractInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts b/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts new file mode 100644 index 0000000..64eabd7 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts @@ -0,0 +1,200 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const TRANSFER_AUTHORITY_DISCRIMINATOR = 4; + +export function getTransferAuthorityDiscriminatorBytes() { + return getU8Encoder().encode(TRANSFER_AUTHORITY_DISCRIMINATOR); +} + +export type TransferAuthorityInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountCurrentAuthority extends string | IAccountMeta = string, + TAccountNewAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableAccount + : TAccountProgram, + TAccountCurrentAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountCurrentAuthority, + TAccountNewAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountNewAuthority, + ...TRemainingAccounts, + ] + >; + +export type TransferAuthorityInstructionData = { discriminator: number }; + +export type TransferAuthorityInstructionDataArgs = {}; + +export function getTransferAuthorityInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', getU8Encoder()]]), + (value) => ({ ...value, discriminator: TRANSFER_AUTHORITY_DISCRIMINATOR }) + ); +} + +export function getTransferAuthorityInstructionDataDecoder(): Decoder { + return getStructDecoder([['discriminator', getU8Decoder()]]); +} + +export function getTransferAuthorityInstructionDataCodec(): Codec< + TransferAuthorityInstructionDataArgs, + TransferAuthorityInstructionData +> { + return combineCodec( + getTransferAuthorityInstructionDataEncoder(), + getTransferAuthorityInstructionDataDecoder() + ); +} + +export type TransferAuthorityInput< + TAccountProgram extends string = string, + TAccountCurrentAuthority extends string = string, + TAccountNewAuthority extends string = string, +> = { + /** Program account to change the authority of. */ + program: Address; + /** Current program authority. */ + currentAuthority: TransactionSigner; + /** New program authority. */ + newAuthority: TransactionSigner; +}; + +export function getTransferAuthorityInstruction< + TAccountProgram extends string, + TAccountCurrentAuthority extends string, + TAccountNewAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: TransferAuthorityInput< + TAccountProgram, + TAccountCurrentAuthority, + TAccountNewAuthority + >, + config?: { programAddress?: TProgramAddress } +): TransferAuthorityInstruction< + TProgramAddress, + TAccountProgram, + TAccountCurrentAuthority, + TAccountNewAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + currentAuthority: { + value: input.currentAuthority ?? null, + isWritable: false, + }, + newAuthority: { value: input.newAuthority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.currentAuthority), + getAccountMeta(accounts.newAuthority), + ], + programAddress, + data: getTransferAuthorityInstructionDataEncoder().encode({}), + } as TransferAuthorityInstruction< + TProgramAddress, + TAccountProgram, + TAccountCurrentAuthority, + TAccountNewAuthority + >; + + return instruction; +} + +export type ParsedTransferAuthorityInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to change the authority of. */ + program: TAccountMetas[0]; + /** Current program authority. */ + currentAuthority: TAccountMetas[1]; + /** New program authority. */ + newAuthority: TAccountMetas[2]; + }; + data: TransferAuthorityInstructionData; +}; + +export function parseTransferAuthorityInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedTransferAuthorityInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + currentAuthority: getNextAccount(), + newAuthority: getNextAccount(), + }, + data: getTransferAuthorityInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/instructions/truncate.ts b/solana-verifier/scripts/loaderV4/instructions/truncate.ts new file mode 100644 index 0000000..d4f8928 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/truncate.ts @@ -0,0 +1,217 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const TRUNCATE_DISCRIMINATOR = 1; + +export function getTruncateDiscriminatorBytes() { + return getU8Encoder().encode(TRUNCATE_DISCRIMINATOR); +} + +export type TruncateInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountDestination extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountDestination extends string + ? WritableAccount + : TAccountDestination, + ...TRemainingAccounts, + ] + >; + +export type TruncateInstructionData = { + discriminator: number; + newSize: number; +}; + +export type TruncateInstructionDataArgs = { newSize: number }; + +export function getTruncateInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['newSize', getU32Encoder()], + ]), + (value) => ({ ...value, discriminator: TRUNCATE_DISCRIMINATOR }) + ); +} + +export function getTruncateInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['newSize', getU32Decoder()], + ]); +} + +export function getTruncateInstructionDataCodec(): Codec< + TruncateInstructionDataArgs, + TruncateInstructionData +> { + return combineCodec( + getTruncateInstructionDataEncoder(), + getTruncateInstructionDataDecoder() + ); +} + +export type TruncateInput< + TAccountProgram extends string = string, + TAccountAuthority extends string = string, + TAccountDestination extends string = string, +> = { + /** Program account to change the size of. */ + program: TransactionSigner; + /** Program authority. */ + authority: TransactionSigner; + /** Destination account for reclaimed lamports (optional). */ + destination?: Address; + newSize: TruncateInstructionDataArgs['newSize']; +}; + +export function getTruncateInstruction< + TAccountProgram extends string, + TAccountAuthority extends string, + TAccountDestination extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: TruncateInput, + config?: { programAddress?: TProgramAddress } +): TruncateInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountDestination +> { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + destination: { value: input.destination ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.destination), + ], + programAddress, + data: getTruncateInstructionDataEncoder().encode( + args as TruncateInstructionDataArgs + ), + } as TruncateInstruction< + TProgramAddress, + TAccountProgram, + TAccountAuthority, + TAccountDestination + >; + + return instruction; +} + +export type ParsedTruncateInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to change the size of. */ + program: TAccountMetas[0]; + /** Program authority. */ + authority: TAccountMetas[1]; + /** Destination account for reclaimed lamports (optional). */ + destination?: TAccountMetas[2] | undefined; + }; + data: TruncateInstructionData; +}; + +export function parseTruncateInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedTruncateInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS + ? undefined + : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + authority: getNextAccount(), + destination: getNextOptionalAccount(), + }, + data: getTruncateInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/instructions/write.ts b/solana-verifier/scripts/loaderV4/instructions/write.ts new file mode 100644 index 0000000..1629a16 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/instructions/write.ts @@ -0,0 +1,198 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + addDecoderSizePrefix, + addEncoderSizePrefix, + combineCodec, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlySignerAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, +} from '@solana/web3.js'; +import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const WRITE_DISCRIMINATOR = 0; + +export function getWriteDiscriminatorBytes() { + return getU8Encoder().encode(WRITE_DISCRIMINATOR); +} + +export type WriteInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountProgram extends string + ? WritableAccount + : TAccountProgram, + TAccountAuthority extends string + ? ReadonlySignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type WriteInstructionData = { + discriminator: number; + offset: number; + bytes: ReadonlyUint8Array; +}; + +export type WriteInstructionDataArgs = { + offset: number; + bytes: ReadonlyUint8Array; +}; + +export function getWriteInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['offset', getU32Encoder()], + ['bytes', addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())], + ]), + (value) => ({ ...value, discriminator: WRITE_DISCRIMINATOR }) + ); +} + +export function getWriteInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['offset', getU32Decoder()], + ['bytes', addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())], + ]); +} + +export function getWriteInstructionDataCodec(): Codec< + WriteInstructionDataArgs, + WriteInstructionData +> { + return combineCodec( + getWriteInstructionDataEncoder(), + getWriteInstructionDataDecoder() + ); +} + +export type WriteInput< + TAccountProgram extends string = string, + TAccountAuthority extends string = string, +> = { + /** Program account to write to. */ + program: Address; + /** Program authority. */ + authority: TransactionSigner; + offset: WriteInstructionDataArgs['offset']; + bytes: WriteInstructionDataArgs['bytes']; +}; + +export function getWriteInstruction< + TAccountProgram extends string, + TAccountAuthority extends string, + TProgramAddress extends + Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, +>( + input: WriteInput, + config?: { programAddress?: TProgramAddress } +): WriteInstruction { + // Program address. + const programAddress = + config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + program: { value: input.program ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.program), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getWriteInstructionDataEncoder().encode( + args as WriteInstructionDataArgs + ), + } as WriteInstruction; + + return instruction; +} + +export type ParsedWriteInstruction< + TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** Program account to write to. */ + program: TAccountMetas[0]; + /** Program authority. */ + authority: TAccountMetas[1]; + }; + data: WriteInstructionData; +}; + +export function parseWriteInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedWriteInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + program: getNextAccount(), + authority: getNextAccount(), + }, + data: getWriteInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/loaderV4/programs/index.ts b/solana-verifier/scripts/loaderV4/programs/index.ts new file mode 100644 index 0000000..208df6e --- /dev/null +++ b/solana-verifier/scripts/loaderV4/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './solanaLoaderV4Program'; diff --git a/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts b/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts new file mode 100644 index 0000000..5f5f09d --- /dev/null +++ b/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts @@ -0,0 +1,83 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + containsBytes, + getU8Encoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { + type ParsedDeployInstruction, + type ParsedFinalizeInstruction, + type ParsedRetractInstruction, + type ParsedTransferAuthorityInstruction, + type ParsedTruncateInstruction, + type ParsedWriteInstruction, +} from '../instructions'; + +export const SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS = + 'CoreBPFLoaderV41111111111111111111111111111' as Address<'CoreBPFLoaderV41111111111111111111111111111'>; + +export enum SolanaLoaderV4ProgramInstruction { + Write, + Truncate, + Deploy, + Retract, + TransferAuthority, + Finalize, +} + +export function identifySolanaLoaderV4ProgramInstruction( + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): SolanaLoaderV4ProgramInstruction { + const data = 'data' in instruction ? instruction.data : instruction; + if (containsBytes(data, getU8Encoder().encode(0), 0)) { + return SolanaLoaderV4ProgramInstruction.Write; + } + if (containsBytes(data, getU8Encoder().encode(1), 0)) { + return SolanaLoaderV4ProgramInstruction.Truncate; + } + if (containsBytes(data, getU8Encoder().encode(2), 0)) { + return SolanaLoaderV4ProgramInstruction.Deploy; + } + if (containsBytes(data, getU8Encoder().encode(3), 0)) { + return SolanaLoaderV4ProgramInstruction.Retract; + } + if (containsBytes(data, getU8Encoder().encode(4), 0)) { + return SolanaLoaderV4ProgramInstruction.TransferAuthority; + } + if (containsBytes(data, getU8Encoder().encode(5), 0)) { + return SolanaLoaderV4ProgramInstruction.Finalize; + } + throw new Error( + 'The provided instruction could not be identified as a solanaLoaderV4Program instruction.' + ); +} + +export type ParsedSolanaLoaderV4ProgramInstruction< + TProgram extends string = 'CoreBPFLoaderV41111111111111111111111111111', +> = + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.Write; + } & ParsedWriteInstruction) + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.Truncate; + } & ParsedTruncateInstruction) + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.Deploy; + } & ParsedDeployInstruction) + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.Retract; + } & ParsedRetractInstruction) + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.TransferAuthority; + } & ParsedTransferAuthorityInstruction) + | ({ + instructionType: SolanaLoaderV4ProgramInstruction.Finalize; + } & ParsedFinalizeInstruction); diff --git a/solana-verifier/scripts/loaderV4/shared/index.ts b/solana-verifier/scripts/loaderV4/shared/index.ts new file mode 100644 index 0000000..01a7d93 --- /dev/null +++ b/solana-verifier/scripts/loaderV4/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/solana-verifier/scripts/utils.ts b/solana-verifier/scripts/utils.ts new file mode 100644 index 0000000..4630821 --- /dev/null +++ b/solana-verifier/scripts/utils.ts @@ -0,0 +1,99 @@ +import fs from "fs"; +import path from "path"; +import os from "os"; + +import { + Rpc, + RpcSubscriptions, + SolanaRpcApi, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + appendTransactionMessageInstruction, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, + createTransactionMessage, + pipe, + SolanaRpcSubscriptionsApi, + Commitment, + BaseTransactionMessage, + TransactionPartialSigner, + createKeyPairSignerFromBytes, + KeyPairSigner, +} from "@solana/web3.js"; + +export interface SendTransactionParams< + TTransaction extends BaseTransactionMessage +> { + rpc: Rpc; + rpcSubscriptions: RpcSubscriptions; + feePayer: TransactionPartialSigner; + instruction: TTransaction["instructions"][number]; + commitment?: Commitment; +} + +export async function sendTransaction< + TTransaction extends BaseTransactionMessage +>({ + rpc, + rpcSubscriptions, + feePayer, + instruction: instruction, + commitment = "confirmed", +}: SendTransactionParams): Promise { + // Get the latest blockhash + const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); + + // Create the send and confirm transaction factory + const sendAndConfirmTransaction = sendAndConfirmTransactionFactory({ + rpc, + rpcSubscriptions, + }); + + // Create the transaction + const baseTransaction = createTransactionMessage({ + version: 0, + }) as TTransaction; + const transactionWithBlockhash = setTransactionMessageLifetimeUsingBlockhash( + latestBlockhash, + baseTransaction + ); + const transactionWithFeePayer = setTransactionMessageFeePayerSigner( + feePayer, + transactionWithBlockhash + ); + const finalTransaction = appendTransactionMessageInstruction( + instruction, + transactionWithFeePayer + ); + + // Sign the transaction + const signedTransaction = await signTransactionMessageWithSigners( + finalTransaction + ); + + // Send and confirm the transaction + await sendAndConfirmTransaction(signedTransaction, { commitment }); +} + +// Code taken from https://solana.com/developers/cookbook/development/load-keypair-from-file +export async function loadDefaultKeypair(): Promise> { + return await loadKeypairFromFile("~/.config/solana/id.json"); +} + +export async function loadKeypairFromFile( + filePath: string +): Promise> { + // This is here so you can also load the default keypair from the file system. + const resolvedPath = path.resolve( + filePath.startsWith("~") ? filePath.replace("~", os.homedir()) : filePath + ); + const loadedKeyBytes = Uint8Array.from( + JSON.parse(fs.readFileSync(resolvedPath, "utf8")) + ); + // Here you can also set the second parameter to true in case you need to extract your private key. + const keypairSigner = await createKeyPairSignerFromBytes( + loadedKeyBytes, + false + ); + return keypairSigner; +} diff --git a/solana-verifier/scripts/verify-router/accounts/index.ts b/solana-verifier/scripts/verify-router/accounts/index.ts new file mode 100644 index 0000000..8e238a8 --- /dev/null +++ b/solana-verifier/scripts/verify-router/accounts/index.ts @@ -0,0 +1,10 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './verifierEntry'; +export * from './verifierRouter'; diff --git a/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts b/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts new file mode 100644 index 0000000..f0d6e78 --- /dev/null +++ b/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts @@ -0,0 +1,150 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + assertAccountExists, + assertAccountsExist, + combineCodec, + decodeAccount, + fetchEncodedAccount, + fetchEncodedAccounts, + fixDecoderSize, + fixEncoderSize, + getAddressDecoder, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Account, + type Address, + type Codec, + type Decoder, + type EncodedAccount, + type Encoder, + type FetchAccountConfig, + type FetchAccountsConfig, + type MaybeAccount, + type MaybeEncodedAccount, + type ReadonlyUint8Array, +} from '@solana/web3.js'; + +export const VERIFIER_ENTRY_DISCRIMINATOR = new Uint8Array([ + 102, 247, 148, 158, 33, 153, 100, 93, +]); + +export function getVerifierEntryDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + VERIFIER_ENTRY_DISCRIMINATOR + ); +} + +export type VerifierEntry = { + discriminator: ReadonlyUint8Array; + router: Address; + selector: number; + verifier: Address; +}; + +export type VerifierEntryArgs = { + router: Address; + selector: number; + verifier: Address; +}; + +export function getVerifierEntryEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['router', getAddressEncoder()], + ['selector', getU32Encoder()], + ['verifier', getAddressEncoder()], + ]), + (value) => ({ ...value, discriminator: VERIFIER_ENTRY_DISCRIMINATOR }) + ); +} + +export function getVerifierEntryDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['router', getAddressDecoder()], + ['selector', getU32Decoder()], + ['verifier', getAddressDecoder()], + ]); +} + +export function getVerifierEntryCodec(): Codec< + VerifierEntryArgs, + VerifierEntry +> { + return combineCodec(getVerifierEntryEncoder(), getVerifierEntryDecoder()); +} + +export function decodeVerifierEntry( + encodedAccount: EncodedAccount +): Account; +export function decodeVerifierEntry( + encodedAccount: MaybeEncodedAccount +): MaybeAccount; +export function decodeVerifierEntry( + encodedAccount: EncodedAccount | MaybeEncodedAccount +): Account | MaybeAccount { + return decodeAccount( + encodedAccount as MaybeEncodedAccount, + getVerifierEntryDecoder() + ); +} + +export async function fetchVerifierEntry( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchMaybeVerifierEntry(rpc, address, config); + assertAccountExists(maybeAccount); + return maybeAccount; +} + +export async function fetchMaybeVerifierEntry( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchEncodedAccount(rpc, address, config); + return decodeVerifierEntry(maybeAccount); +} + +export async function fetchAllVerifierEntry( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchAllMaybeVerifierEntry( + rpc, + addresses, + config + ); + assertAccountsExist(maybeAccounts); + return maybeAccounts; +} + +export async function fetchAllMaybeVerifierEntry( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); + return maybeAccounts.map((maybeAccount) => decodeVerifierEntry(maybeAccount)); +} + +export function getVerifierEntrySize(): number { + return 76; +} diff --git a/solana-verifier/scripts/verify-router/accounts/verifierRouter.ts b/solana-verifier/scripts/verify-router/accounts/verifierRouter.ts new file mode 100644 index 0000000..4509efd --- /dev/null +++ b/solana-verifier/scripts/verify-router/accounts/verifierRouter.ts @@ -0,0 +1,150 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + assertAccountExists, + assertAccountsExist, + combineCodec, + decodeAccount, + fetchEncodedAccount, + fetchEncodedAccounts, + fixDecoderSize, + fixEncoderSize, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Account, + type Address, + type Codec, + type Decoder, + type EncodedAccount, + type Encoder, + type FetchAccountConfig, + type FetchAccountsConfig, + type MaybeAccount, + type MaybeEncodedAccount, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { + getOwnershipDecoder, + getOwnershipEncoder, + type Ownership, + type OwnershipArgs, +} from '../types'; + +export const VERIFIER_ROUTER_DISCRIMINATOR = new Uint8Array([ + 188, 46, 30, 54, 25, 63, 197, 26, +]); + +export function getVerifierRouterDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + VERIFIER_ROUTER_DISCRIMINATOR + ); +} + +export type VerifierRouter = { + discriminator: ReadonlyUint8Array; + ownership: Ownership; + verifierCount: number; +}; + +export type VerifierRouterArgs = { + ownership: OwnershipArgs; + verifierCount: number; +}; + +export function getVerifierRouterEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['ownership', getOwnershipEncoder()], + ['verifierCount', getU32Encoder()], + ]), + (value) => ({ ...value, discriminator: VERIFIER_ROUTER_DISCRIMINATOR }) + ); +} + +export function getVerifierRouterDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['ownership', getOwnershipDecoder()], + ['verifierCount', getU32Decoder()], + ]); +} + +export function getVerifierRouterCodec(): Codec< + VerifierRouterArgs, + VerifierRouter +> { + return combineCodec(getVerifierRouterEncoder(), getVerifierRouterDecoder()); +} + +export function decodeVerifierRouter( + encodedAccount: EncodedAccount +): Account; +export function decodeVerifierRouter( + encodedAccount: MaybeEncodedAccount +): MaybeAccount; +export function decodeVerifierRouter( + encodedAccount: EncodedAccount | MaybeEncodedAccount +): Account | MaybeAccount { + return decodeAccount( + encodedAccount as MaybeEncodedAccount, + getVerifierRouterDecoder() + ); +} + +export async function fetchVerifierRouter( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchMaybeVerifierRouter(rpc, address, config); + assertAccountExists(maybeAccount); + return maybeAccount; +} + +export async function fetchMaybeVerifierRouter< + TAddress extends string = string, +>( + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig +): Promise> { + const maybeAccount = await fetchEncodedAccount(rpc, address, config); + return decodeVerifierRouter(maybeAccount); +} + +export async function fetchAllVerifierRouter( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchAllMaybeVerifierRouter( + rpc, + addresses, + config + ); + assertAccountsExist(maybeAccounts); + return maybeAccounts; +} + +export async function fetchAllMaybeVerifierRouter( + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig +): Promise[]> { + const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); + return maybeAccounts.map((maybeAccount) => + decodeVerifierRouter(maybeAccount) + ); +} diff --git a/solana-verifier/scripts/verify-router/errors/index.ts b/solana-verifier/scripts/verify-router/errors/index.ts new file mode 100644 index 0000000..74b5e70 --- /dev/null +++ b/solana-verifier/scripts/verify-router/errors/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './verifierRouter'; diff --git a/solana-verifier/scripts/verify-router/errors/verifierRouter.ts b/solana-verifier/scripts/verify-router/errors/verifierRouter.ts new file mode 100644 index 0000000..2b8b96a --- /dev/null +++ b/solana-verifier/scripts/verify-router/errors/verifierRouter.ts @@ -0,0 +1,60 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + isProgramError, + type Address, + type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, + type SolanaError, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; + +/** InvalidProofOfExploit: Invalid proof of exploit */ +export const VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT = 0x1770; // 6000 + +export type VerifierRouterError = + typeof VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT; + +let verifierRouterErrorMessages: + | Record + | undefined; +if (process.env.NODE_ENV !== 'production') { + verifierRouterErrorMessages = { + [VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT]: `Invalid proof of exploit`, + }; +} + +export function getVerifierRouterErrorMessage( + code: VerifierRouterError +): string { + if (process.env.NODE_ENV !== 'production') { + return (verifierRouterErrorMessages as Record)[ + code + ]; + } + + return 'Error message not available in production bundles.'; +} + +export function isVerifierRouterError< + TProgramErrorCode extends VerifierRouterError, +>( + error: unknown, + transactionMessage: { + instructions: Record; + }, + code?: TProgramErrorCode +): error is SolanaError & + Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { + return isProgramError( + error, + transactionMessage, + VERIFIER_ROUTER_PROGRAM_ADDRESS, + code + ); +} diff --git a/solana-verifier/scripts/verify-router/index.ts b/solana-verifier/scripts/verify-router/index.ts new file mode 100644 index 0000000..02964a6 --- /dev/null +++ b/solana-verifier/scripts/verify-router/index.ts @@ -0,0 +1,13 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './accounts'; +export * from './errors'; +export * from './instructions'; +export * from './programs'; +export * from './types'; diff --git a/solana-verifier/scripts/verify-router/instructions/acceptOwnership.ts b/solana-verifier/scripts/verify-router/instructions/acceptOwnership.ts new file mode 100644 index 0000000..eef3772 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/acceptOwnership.ts @@ -0,0 +1,183 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const ACCEPT_OWNERSHIP_DISCRIMINATOR = new Uint8Array([ + 172, 23, 43, 13, 238, 213, 85, 150, +]); + +export function getAcceptOwnershipDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + ACCEPT_OWNERSHIP_DISCRIMINATOR + ); +} + +export type AcceptOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountState extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountState extends string + ? WritableAccount + : TAccountState, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type AcceptOwnershipInstructionData = { + discriminator: ReadonlyUint8Array; +}; + +export type AcceptOwnershipInstructionDataArgs = {}; + +export function getAcceptOwnershipInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), + (value) => ({ ...value, discriminator: ACCEPT_OWNERSHIP_DISCRIMINATOR }) + ); +} + +export function getAcceptOwnershipInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ]); +} + +export function getAcceptOwnershipInstructionDataCodec(): Codec< + AcceptOwnershipInstructionDataArgs, + AcceptOwnershipInstructionData +> { + return combineCodec( + getAcceptOwnershipInstructionDataEncoder(), + getAcceptOwnershipInstructionDataDecoder() + ); +} + +export type AcceptOwnershipInput< + TAccountState extends string = string, + TAccountAuthority extends string = string, +> = { + state: Address; + authority: TransactionSigner; +}; + +export function getAcceptOwnershipInstruction< + TAccountState extends string, + TAccountAuthority extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: AcceptOwnershipInput, + config?: { programAddress?: TProgramAddress } +): AcceptOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + state: { value: input.state ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.state), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getAcceptOwnershipInstructionDataEncoder().encode({}), + } as AcceptOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedAcceptOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + state: TAccountMetas[0]; + authority: TAccountMetas[1]; + }; + data: AcceptOwnershipInstructionData; +}; + +export function parseAcceptOwnershipInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedAcceptOwnershipInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + state: getNextAccount(), + authority: getNextAccount(), + }, + data: getAcceptOwnershipInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/addVerifier.ts b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts new file mode 100644 index 0000000..df5e728 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts @@ -0,0 +1,415 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getProgramDerivedAddress, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; + +export const ADD_VERIFIER_DISCRIMINATOR = new Uint8Array([ + 165, 72, 135, 225, 67, 181, 255, 135, +]); + +export function getAddVerifierDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + ADD_VERIFIER_DISCRIMINATOR + ); +} + +export type AddVerifierInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountRouter extends string | IAccountMeta = string, + TAccountVerifierEntry extends string | IAccountMeta = string, + TAccountVerifierProgramData extends string | IAccountMeta = string, + TAccountVerifierProgram extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountRouter extends string + ? WritableAccount + : TAccountRouter, + TAccountVerifierEntry extends string + ? WritableAccount + : TAccountVerifierEntry, + TAccountVerifierProgramData extends string + ? ReadonlyAccount + : TAccountVerifierProgramData, + TAccountVerifierProgram extends string + ? ReadonlyAccount + : TAccountVerifierProgram, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type AddVerifierInstructionData = { + discriminator: ReadonlyUint8Array; + selector: number; +}; + +export type AddVerifierInstructionDataArgs = { selector: number }; + +export function getAddVerifierInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['selector', getU32Encoder()], + ]), + (value) => ({ ...value, discriminator: ADD_VERIFIER_DISCRIMINATOR }) + ); +} + +export function getAddVerifierInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['selector', getU32Decoder()], + ]); +} + +export function getAddVerifierInstructionDataCodec(): Codec< + AddVerifierInstructionDataArgs, + AddVerifierInstructionData +> { + return combineCodec( + getAddVerifierInstructionDataEncoder(), + getAddVerifierInstructionDataDecoder() + ); +} + +export type AddVerifierAsyncInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountVerifierProgram extends string = string, + TAccountAuthority extends string = string, + TAccountSystemProgram extends string = string, +> = { + router?: Address; + verifierEntry?: Address; + verifierProgramData?: Address; + verifierProgram: Address; + authority: TransactionSigner; + systemProgram?: Address; + selector: AddVerifierInstructionDataArgs['selector']; +}; + +export async function getAddVerifierInstructionAsync< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountVerifierProgramData extends string, + TAccountVerifierProgram extends string, + TAccountAuthority extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: AddVerifierAsyncInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): Promise< + AddVerifierInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram + > +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: false, + }, + verifierProgram: { + value: input.verifierProgram ?? null, + isWritable: false, + }, + authority: { value: input.authority ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.router.value) { + accounts.router.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([114, 111, 117, 116, 101, 114]) + ), + ], + }); + } + if (!accounts.verifierEntry.value) { + accounts.verifierEntry.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) + ), + getAddressEncoder().encode(expectAddress(accounts.router.value)), + getU32Encoder().encode(expectSome(args.selector)), + ], + }); + } + if (!accounts.verifierProgramData.value) { + accounts.verifierProgramData.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode( + expectAddress(accounts.verifierProgram.value) + ), + ], + }); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getAddVerifierInstructionDataEncoder().encode( + args as AddVerifierInstructionDataArgs + ), + } as AddVerifierInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram + >; + + return instruction; +} + +export type AddVerifierInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountVerifierProgram extends string = string, + TAccountAuthority extends string = string, + TAccountSystemProgram extends string = string, +> = { + router: Address; + verifierEntry: Address; + verifierProgramData: Address; + verifierProgram: Address; + authority: TransactionSigner; + systemProgram?: Address; + selector: AddVerifierInstructionDataArgs['selector']; +}; + +export function getAddVerifierInstruction< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountVerifierProgramData extends string, + TAccountVerifierProgram extends string, + TAccountAuthority extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: AddVerifierInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): AddVerifierInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: false, + }, + verifierProgram: { + value: input.verifierProgram ?? null, + isWritable: false, + }, + authority: { value: input.authority ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getAddVerifierInstructionDataEncoder().encode( + args as AddVerifierInstructionDataArgs + ), + } as AddVerifierInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgramData, + TAccountVerifierProgram, + TAccountAuthority, + TAccountSystemProgram + >; + + return instruction; +} + +export type ParsedAddVerifierInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + router: TAccountMetas[0]; + verifierEntry: TAccountMetas[1]; + verifierProgramData: TAccountMetas[2]; + verifierProgram: TAccountMetas[3]; + authority: TAccountMetas[4]; + systemProgram: TAccountMetas[5]; + }; + data: AddVerifierInstructionData; +}; + +export function parseAddVerifierInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedAddVerifierInstruction { + if (instruction.accounts.length < 6) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + router: getNextAccount(), + verifierEntry: getNextAccount(), + verifierProgramData: getNextAccount(), + verifierProgram: getNextAccount(), + authority: getNextAccount(), + systemProgram: getNextAccount(), + }, + data: getAddVerifierInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/cancelTransfer.ts b/solana-verifier/scripts/verify-router/instructions/cancelTransfer.ts new file mode 100644 index 0000000..03a80f6 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/cancelTransfer.ts @@ -0,0 +1,183 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const CANCEL_TRANSFER_DISCRIMINATOR = new Uint8Array([ + 50, 32, 70, 130, 142, 41, 111, 175, +]); + +export function getCancelTransferDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + CANCEL_TRANSFER_DISCRIMINATOR + ); +} + +export type CancelTransferInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountState extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountState extends string + ? WritableAccount + : TAccountState, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type CancelTransferInstructionData = { + discriminator: ReadonlyUint8Array; +}; + +export type CancelTransferInstructionDataArgs = {}; + +export function getCancelTransferInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), + (value) => ({ ...value, discriminator: CANCEL_TRANSFER_DISCRIMINATOR }) + ); +} + +export function getCancelTransferInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ]); +} + +export function getCancelTransferInstructionDataCodec(): Codec< + CancelTransferInstructionDataArgs, + CancelTransferInstructionData +> { + return combineCodec( + getCancelTransferInstructionDataEncoder(), + getCancelTransferInstructionDataDecoder() + ); +} + +export type CancelTransferInput< + TAccountState extends string = string, + TAccountAuthority extends string = string, +> = { + state: Address; + authority: TransactionSigner; +}; + +export function getCancelTransferInstruction< + TAccountState extends string, + TAccountAuthority extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: CancelTransferInput, + config?: { programAddress?: TProgramAddress } +): CancelTransferInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + state: { value: input.state ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.state), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getCancelTransferInstructionDataEncoder().encode({}), + } as CancelTransferInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedCancelTransferInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + state: TAccountMetas[0]; + authority: TAccountMetas[1]; + }; + data: CancelTransferInstructionData; +}; + +export function parseCancelTransferInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedCancelTransferInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + state: getNextAccount(), + authority: getNextAccount(), + }, + data: getCancelTransferInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts new file mode 100644 index 0000000..f8298e8 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts @@ -0,0 +1,464 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getProgramDerivedAddress, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; + +export const EMERGENCY_STOP_DISCRIMINATOR = new Uint8Array([ + 179, 143, 200, 137, 108, 245, 248, 35, +]); + +export function getEmergencyStopDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + EMERGENCY_STOP_DISCRIMINATOR + ); +} + +export type EmergencyStopInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountRouter extends string | IAccountMeta = string, + TAccountVerifierEntry extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountVerifierProgram extends string | IAccountMeta = string, + TAccountVerifierProgramData extends string | IAccountMeta = string, + TAccountBpfLoaderUpgradableProgram extends + | string + | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountRouter extends string + ? WritableAccount + : TAccountRouter, + TAccountVerifierEntry extends string + ? WritableAccount + : TAccountVerifierEntry, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountVerifierProgram extends string + ? WritableAccount + : TAccountVerifierProgram, + TAccountVerifierProgramData extends string + ? WritableAccount + : TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram extends string + ? ReadonlyAccount + : TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type EmergencyStopInstructionData = { + discriminator: ReadonlyUint8Array; + selector: number; +}; + +export type EmergencyStopInstructionDataArgs = { selector: number }; + +export function getEmergencyStopInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['selector', getU32Encoder()], + ]), + (value) => ({ ...value, discriminator: EMERGENCY_STOP_DISCRIMINATOR }) + ); +} + +export function getEmergencyStopInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['selector', getU32Decoder()], + ]); +} + +export function getEmergencyStopInstructionDataCodec(): Codec< + EmergencyStopInstructionDataArgs, + EmergencyStopInstructionData +> { + return combineCodec( + getEmergencyStopInstructionDataEncoder(), + getEmergencyStopInstructionDataDecoder() + ); +} + +export type EmergencyStopAsyncInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountAuthority extends string = string, + TAccountVerifierProgram extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountBpfLoaderUpgradableProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing ownership and verifier registry */ + router?: Address; + /** The verifier entry to be closed */ + verifierEntry?: Address; + /** The authority attempting the emergency stop */ + authority: TransactionSigner; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + verifierProgram: Address; + /** The Program Data account of the verifier to be closed */ + verifierProgramData?: Address; + bpfLoaderUpgradableProgram: Address; + systemProgram?: Address; + selector: EmergencyStopInstructionDataArgs['selector']; +}; + +export async function getEmergencyStopInstructionAsync< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountAuthority extends string, + TAccountVerifierProgram extends string, + TAccountVerifierProgramData extends string, + TAccountBpfLoaderUpgradableProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: EmergencyStopAsyncInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): Promise< + EmergencyStopInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + > +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + verifierProgram: { value: input.verifierProgram ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: true, + }, + bpfLoaderUpgradableProgram: { + value: input.bpfLoaderUpgradableProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.router.value) { + accounts.router.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([114, 111, 117, 116, 101, 114]) + ), + ], + }); + } + if (!accounts.verifierEntry.value) { + accounts.verifierEntry.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) + ), + getAddressEncoder().encode(expectAddress(accounts.router.value)), + getU32Encoder().encode(expectSome(args.selector)), + ], + }); + } + if (!accounts.verifierProgramData.value) { + accounts.verifierProgramData.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode( + expectAddress(accounts.verifierProgram.value) + ), + ], + }); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.bpfLoaderUpgradableProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getEmergencyStopInstructionDataEncoder().encode( + args as EmergencyStopInstructionDataArgs + ), + } as EmergencyStopInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type EmergencyStopInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountAuthority extends string = string, + TAccountVerifierProgram extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountBpfLoaderUpgradableProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing ownership and verifier registry */ + router: Address; + /** The verifier entry to be closed */ + verifierEntry: Address; + /** The authority attempting the emergency stop */ + authority: TransactionSigner; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + verifierProgram: Address; + /** The Program Data account of the verifier to be closed */ + verifierProgramData: Address; + bpfLoaderUpgradableProgram: Address; + systemProgram?: Address; + selector: EmergencyStopInstructionDataArgs['selector']; +}; + +export function getEmergencyStopInstruction< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountAuthority extends string, + TAccountVerifierProgram extends string, + TAccountVerifierProgramData extends string, + TAccountBpfLoaderUpgradableProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: EmergencyStopInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): EmergencyStopInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + verifierProgram: { value: input.verifierProgram ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: true, + }, + bpfLoaderUpgradableProgram: { + value: input.bpfLoaderUpgradableProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.bpfLoaderUpgradableProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getEmergencyStopInstructionDataEncoder().encode( + args as EmergencyStopInstructionDataArgs + ), + } as EmergencyStopInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type ParsedEmergencyStopInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** The router account containing ownership and verifier registry */ + router: TAccountMetas[0]; + /** The verifier entry to be closed */ + verifierEntry: TAccountMetas[1]; + /** The authority attempting the emergency stop */ + authority: TAccountMetas[2]; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + + verifierProgram: TAccountMetas[3]; + /** The Program Data account of the verifier to be closed */ + verifierProgramData: TAccountMetas[4]; + bpfLoaderUpgradableProgram: TAccountMetas[5]; + systemProgram: TAccountMetas[6]; + }; + data: EmergencyStopInstructionData; +}; + +export function parseEmergencyStopInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedEmergencyStopInstruction { + if (instruction.accounts.length < 7) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + router: getNextAccount(), + verifierEntry: getNextAccount(), + authority: getNextAccount(), + verifierProgram: getNextAccount(), + verifierProgramData: getNextAccount(), + bpfLoaderUpgradableProgram: getNextAccount(), + systemProgram: getNextAccount(), + }, + data: getEmergencyStopInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts new file mode 100644 index 0000000..df5f97a --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts @@ -0,0 +1,495 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getProgramDerivedAddress, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; +import { + getProofDecoder, + getProofEncoder, + type Proof, + type ProofArgs, +} from '../types'; + +export const EMERGENCY_STOP_WITH_PROOF_DISCRIMINATOR = new Uint8Array([ + 54, 84, 135, 9, 249, 7, 161, 4, +]); + +export function getEmergencyStopWithProofDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + EMERGENCY_STOP_WITH_PROOF_DISCRIMINATOR + ); +} + +export type EmergencyStopWithProofInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountRouter extends string | IAccountMeta = string, + TAccountVerifierEntry extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountVerifierProgram extends string | IAccountMeta = string, + TAccountVerifierProgramData extends string | IAccountMeta = string, + TAccountBpfLoaderUpgradableProgram extends + | string + | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountRouter extends string + ? WritableAccount + : TAccountRouter, + TAccountVerifierEntry extends string + ? WritableAccount + : TAccountVerifierEntry, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountVerifierProgram extends string + ? WritableAccount + : TAccountVerifierProgram, + TAccountVerifierProgramData extends string + ? WritableAccount + : TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram extends string + ? ReadonlyAccount + : TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type EmergencyStopWithProofInstructionData = { + discriminator: ReadonlyUint8Array; + selector: number; + proof: Proof; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export type EmergencyStopWithProofInstructionDataArgs = { + selector: number; + proof: ProofArgs; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export function getEmergencyStopWithProofInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['selector', getU32Encoder()], + ['proof', getProofEncoder()], + ['imageId', fixEncoderSize(getBytesEncoder(), 32)], + ['journalDigest', fixEncoderSize(getBytesEncoder(), 32)], + ]), + (value) => ({ + ...value, + discriminator: EMERGENCY_STOP_WITH_PROOF_DISCRIMINATOR, + }) + ); +} + +export function getEmergencyStopWithProofInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['selector', getU32Decoder()], + ['proof', getProofDecoder()], + ['imageId', fixDecoderSize(getBytesDecoder(), 32)], + ['journalDigest', fixDecoderSize(getBytesDecoder(), 32)], + ]); +} + +export function getEmergencyStopWithProofInstructionDataCodec(): Codec< + EmergencyStopWithProofInstructionDataArgs, + EmergencyStopWithProofInstructionData +> { + return combineCodec( + getEmergencyStopWithProofInstructionDataEncoder(), + getEmergencyStopWithProofInstructionDataDecoder() + ); +} + +export type EmergencyStopWithProofAsyncInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountAuthority extends string = string, + TAccountVerifierProgram extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountBpfLoaderUpgradableProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing ownership and verifier registry */ + router?: Address; + /** The verifier entry to be closed */ + verifierEntry?: Address; + /** The authority attempting the emergency stop */ + authority: TransactionSigner; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + verifierProgram: Address; + /** The Program Data account of the verifier to be closed */ + verifierProgramData?: Address; + bpfLoaderUpgradableProgram: Address; + systemProgram?: Address; + selector: EmergencyStopWithProofInstructionDataArgs['selector']; + proof: EmergencyStopWithProofInstructionDataArgs['proof']; + imageId: EmergencyStopWithProofInstructionDataArgs['imageId']; + journalDigest: EmergencyStopWithProofInstructionDataArgs['journalDigest']; +}; + +export async function getEmergencyStopWithProofInstructionAsync< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountAuthority extends string, + TAccountVerifierProgram extends string, + TAccountVerifierProgramData extends string, + TAccountBpfLoaderUpgradableProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: EmergencyStopWithProofAsyncInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): Promise< + EmergencyStopWithProofInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + > +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + verifierProgram: { value: input.verifierProgram ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: true, + }, + bpfLoaderUpgradableProgram: { + value: input.bpfLoaderUpgradableProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.router.value) { + accounts.router.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([114, 111, 117, 116, 101, 114]) + ), + ], + }); + } + if (!accounts.verifierEntry.value) { + accounts.verifierEntry.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) + ), + getAddressEncoder().encode(expectAddress(accounts.router.value)), + getU32Encoder().encode(expectSome(args.selector)), + ], + }); + } + if (!accounts.verifierProgramData.value) { + accounts.verifierProgramData.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getAddressEncoder().encode( + expectAddress(accounts.verifierProgram.value) + ), + ], + }); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.bpfLoaderUpgradableProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getEmergencyStopWithProofInstructionDataEncoder().encode( + args as EmergencyStopWithProofInstructionDataArgs + ), + } as EmergencyStopWithProofInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type EmergencyStopWithProofInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountAuthority extends string = string, + TAccountVerifierProgram extends string = string, + TAccountVerifierProgramData extends string = string, + TAccountBpfLoaderUpgradableProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing ownership and verifier registry */ + router: Address; + /** The verifier entry to be closed */ + verifierEntry: Address; + /** The authority attempting the emergency stop */ + authority: TransactionSigner; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + verifierProgram: Address; + /** The Program Data account of the verifier to be closed */ + verifierProgramData: Address; + bpfLoaderUpgradableProgram: Address; + systemProgram?: Address; + selector: EmergencyStopWithProofInstructionDataArgs['selector']; + proof: EmergencyStopWithProofInstructionDataArgs['proof']; + imageId: EmergencyStopWithProofInstructionDataArgs['imageId']; + journalDigest: EmergencyStopWithProofInstructionDataArgs['journalDigest']; +}; + +export function getEmergencyStopWithProofInstruction< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountAuthority extends string, + TAccountVerifierProgram extends string, + TAccountVerifierProgramData extends string, + TAccountBpfLoaderUpgradableProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: EmergencyStopWithProofInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): EmergencyStopWithProofInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + verifierProgram: { value: input.verifierProgram ?? null, isWritable: true }, + verifierProgramData: { + value: input.verifierProgramData ?? null, + isWritable: true, + }, + bpfLoaderUpgradableProgram: { + value: input.bpfLoaderUpgradableProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.verifierProgramData), + getAccountMeta(accounts.bpfLoaderUpgradableProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getEmergencyStopWithProofInstructionDataEncoder().encode( + args as EmergencyStopWithProofInstructionDataArgs + ), + } as EmergencyStopWithProofInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountAuthority, + TAccountVerifierProgram, + TAccountVerifierProgramData, + TAccountBpfLoaderUpgradableProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type ParsedEmergencyStopWithProofInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** The router account containing ownership and verifier registry */ + router: TAccountMetas[0]; + /** The verifier entry to be closed */ + verifierEntry: TAccountMetas[1]; + /** The authority attempting the emergency stop */ + authority: TAccountMetas[2]; + /** + * The program account of the verifier to be used + * Address is verified against VerifierEntry + */ + + verifierProgram: TAccountMetas[3]; + /** The Program Data account of the verifier to be closed */ + verifierProgramData: TAccountMetas[4]; + bpfLoaderUpgradableProgram: TAccountMetas[5]; + systemProgram: TAccountMetas[6]; + }; + data: EmergencyStopWithProofInstructionData; +}; + +export function parseEmergencyStopWithProofInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedEmergencyStopWithProofInstruction { + if (instruction.accounts.length < 7) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + router: getNextAccount(), + verifierEntry: getNextAccount(), + authority: getNextAccount(), + verifierProgram: getNextAccount(), + verifierProgramData: getNextAccount(), + bpfLoaderUpgradableProgram: getNextAccount(), + systemProgram: getNextAccount(), + }, + data: getEmergencyStopWithProofInstructionDataDecoder().decode( + instruction.data + ), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/index.ts b/solana-verifier/scripts/verify-router/instructions/index.ts new file mode 100644 index 0000000..0b92564 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/index.ts @@ -0,0 +1,17 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './acceptOwnership'; +export * from './addVerifier'; +export * from './cancelTransfer'; +export * from './emergencyStop'; +export * from './emergencyStopWithProof'; +export * from './initialize'; +export * from './renounceOwnership'; +export * from './transferOwnership'; +export * from './verify'; diff --git a/solana-verifier/scripts/verify-router/instructions/initialize.ts b/solana-verifier/scripts/verify-router/instructions/initialize.ts new file mode 100644 index 0000000..7c3fc21 --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/initialize.ts @@ -0,0 +1,305 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getBytesDecoder, + getBytesEncoder, + getProgramDerivedAddress, + getStructDecoder, + getStructEncoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const INITIALIZE_DISCRIMINATOR = new Uint8Array([ + 175, 175, 109, 31, 13, 152, 155, 237, +]); + +export function getInitializeDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode(INITIALIZE_DISCRIMINATOR); +} + +export type InitializeInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountRouter extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountRouter extends string + ? WritableAccount + : TAccountRouter, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type InitializeInstructionData = { discriminator: ReadonlyUint8Array }; + +export type InitializeInstructionDataArgs = {}; + +export function getInitializeInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), + (value) => ({ ...value, discriminator: INITIALIZE_DISCRIMINATOR }) + ); +} + +export function getInitializeInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ]); +} + +export function getInitializeInstructionDataCodec(): Codec< + InitializeInstructionDataArgs, + InitializeInstructionData +> { + return combineCodec( + getInitializeInstructionDataEncoder(), + getInitializeInstructionDataDecoder() + ); +} + +export type InitializeAsyncInput< + TAccountRouter extends string = string, + TAccountAuthority extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** + * The router account to be initialized + * Space allocated for discriminator + owner + option + count + */ + router?: Address; + /** The authority initializing and paying for the router */ + authority: TransactionSigner; + /** Required for account initialization */ + systemProgram?: Address; +}; + +export async function getInitializeInstructionAsync< + TAccountRouter extends string, + TAccountAuthority extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: InitializeAsyncInput< + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): Promise< + InitializeInstruction< + TProgramAddress, + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram + > +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Resolve default values. + if (!accounts.router.value) { + accounts.router.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([114, 111, 117, 116, 101, 114]) + ), + ], + }); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getInitializeInstructionDataEncoder().encode({}), + } as InitializeInstruction< + TProgramAddress, + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram + >; + + return instruction; +} + +export type InitializeInput< + TAccountRouter extends string = string, + TAccountAuthority extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** + * The router account to be initialized + * Space allocated for discriminator + owner + option + count + */ + router: Address; + /** The authority initializing and paying for the router */ + authority: TransactionSigner; + /** Required for account initialization */ + systemProgram?: Address; +}; + +export function getInitializeInstruction< + TAccountRouter extends string, + TAccountAuthority extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: InitializeInput< + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): InitializeInstruction< + TProgramAddress, + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.authority), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getInitializeInstructionDataEncoder().encode({}), + } as InitializeInstruction< + TProgramAddress, + TAccountRouter, + TAccountAuthority, + TAccountSystemProgram + >; + + return instruction; +} + +export type ParsedInitializeInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** + * The router account to be initialized + * Space allocated for discriminator + owner + option + count + */ + + router: TAccountMetas[0]; + /** The authority initializing and paying for the router */ + authority: TAccountMetas[1]; + /** Required for account initialization */ + systemProgram: TAccountMetas[2]; + }; + data: InitializeInstructionData; +}; + +export function parseInitializeInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedInitializeInstruction { + if (instruction.accounts.length < 3) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + router: getNextAccount(), + authority: getNextAccount(), + systemProgram: getNextAccount(), + }, + data: getInitializeInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/renounceOwnership.ts b/solana-verifier/scripts/verify-router/instructions/renounceOwnership.ts new file mode 100644 index 0000000..ec3969d --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/renounceOwnership.ts @@ -0,0 +1,183 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const RENOUNCE_OWNERSHIP_DISCRIMINATOR = new Uint8Array([ + 19, 143, 91, 79, 34, 168, 174, 125, +]); + +export function getRenounceOwnershipDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + RENOUNCE_OWNERSHIP_DISCRIMINATOR + ); +} + +export type RenounceOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountState extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountState extends string + ? WritableAccount + : TAccountState, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type RenounceOwnershipInstructionData = { + discriminator: ReadonlyUint8Array; +}; + +export type RenounceOwnershipInstructionDataArgs = {}; + +export function getRenounceOwnershipInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), + (value) => ({ ...value, discriminator: RENOUNCE_OWNERSHIP_DISCRIMINATOR }) + ); +} + +export function getRenounceOwnershipInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ]); +} + +export function getRenounceOwnershipInstructionDataCodec(): Codec< + RenounceOwnershipInstructionDataArgs, + RenounceOwnershipInstructionData +> { + return combineCodec( + getRenounceOwnershipInstructionDataEncoder(), + getRenounceOwnershipInstructionDataDecoder() + ); +} + +export type RenounceOwnershipInput< + TAccountState extends string = string, + TAccountAuthority extends string = string, +> = { + state: Address; + authority: TransactionSigner; +}; + +export function getRenounceOwnershipInstruction< + TAccountState extends string, + TAccountAuthority extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: RenounceOwnershipInput, + config?: { programAddress?: TProgramAddress } +): RenounceOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + state: { value: input.state ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.state), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getRenounceOwnershipInstructionDataEncoder().encode({}), + } as RenounceOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedRenounceOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + state: TAccountMetas[0]; + authority: TAccountMetas[1]; + }; + data: RenounceOwnershipInstructionData; +}; + +export function parseRenounceOwnershipInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedRenounceOwnershipInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + state: getNextAccount(), + authority: getNextAccount(), + }, + data: getRenounceOwnershipInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/transferOwnership.ts b/solana-verifier/scripts/verify-router/instructions/transferOwnership.ts new file mode 100644 index 0000000..c906eab --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/transferOwnership.ts @@ -0,0 +1,196 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getAddressDecoder, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IAccountSignerMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, + type WritableSignerAccount, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; + +export const TRANSFER_OWNERSHIP_DISCRIMINATOR = new Uint8Array([ + 65, 177, 215, 73, 53, 45, 99, 47, +]); + +export function getTransferOwnershipDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode( + TRANSFER_OWNERSHIP_DISCRIMINATOR + ); +} + +export type TransferOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountState extends string | IAccountMeta = string, + TAccountAuthority extends string | IAccountMeta = string, + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountState extends string + ? WritableAccount + : TAccountState, + TAccountAuthority extends string + ? WritableSignerAccount & + IAccountSignerMeta + : TAccountAuthority, + ...TRemainingAccounts, + ] + >; + +export type TransferOwnershipInstructionData = { + discriminator: ReadonlyUint8Array; + newOwner: Address; +}; + +export type TransferOwnershipInstructionDataArgs = { newOwner: Address }; + +export function getTransferOwnershipInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['newOwner', getAddressEncoder()], + ]), + (value) => ({ ...value, discriminator: TRANSFER_OWNERSHIP_DISCRIMINATOR }) + ); +} + +export function getTransferOwnershipInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['newOwner', getAddressDecoder()], + ]); +} + +export function getTransferOwnershipInstructionDataCodec(): Codec< + TransferOwnershipInstructionDataArgs, + TransferOwnershipInstructionData +> { + return combineCodec( + getTransferOwnershipInstructionDataEncoder(), + getTransferOwnershipInstructionDataDecoder() + ); +} + +export type TransferOwnershipInput< + TAccountState extends string = string, + TAccountAuthority extends string = string, +> = { + state: Address; + authority: TransactionSigner; + newOwner: TransferOwnershipInstructionDataArgs['newOwner']; +}; + +export function getTransferOwnershipInstruction< + TAccountState extends string, + TAccountAuthority extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: TransferOwnershipInput, + config?: { programAddress?: TProgramAddress } +): TransferOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + state: { value: input.state ?? null, isWritable: true }, + authority: { value: input.authority ?? null, isWritable: true }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.state), + getAccountMeta(accounts.authority), + ], + programAddress, + data: getTransferOwnershipInstructionDataEncoder().encode( + args as TransferOwnershipInstructionDataArgs + ), + } as TransferOwnershipInstruction< + TProgramAddress, + TAccountState, + TAccountAuthority + >; + + return instruction; +} + +export type ParsedTransferOwnershipInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + state: TAccountMetas[0]; + authority: TAccountMetas[1]; + }; + data: TransferOwnershipInstructionData; +}; + +export function parseTransferOwnershipInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedTransferOwnershipInstruction { + if (instruction.accounts.length < 2) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + state: getNextAccount(), + authority: getNextAccount(), + }, + data: getTransferOwnershipInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/instructions/verify.ts b/solana-verifier/scripts/verify-router/instructions/verify.ts new file mode 100644 index 0000000..9606ffc --- /dev/null +++ b/solana-verifier/scripts/verify-router/instructions/verify.ts @@ -0,0 +1,393 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getAddressEncoder, + getBytesDecoder, + getBytesEncoder, + getProgramDerivedAddress, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + transformEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type IAccountMeta, + type IInstruction, + type IInstructionWithAccounts, + type IInstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; +import { + expectAddress, + expectSome, + getAccountMetaFactory, + type ResolvedAccount, +} from '../shared'; +import { + getProofDecoder, + getProofEncoder, + type Proof, + type ProofArgs, +} from '../types'; + +export const VERIFY_DISCRIMINATOR = new Uint8Array([ + 133, 161, 141, 48, 120, 198, 88, 150, +]); + +export function getVerifyDiscriminatorBytes() { + return fixEncoderSize(getBytesEncoder(), 8).encode(VERIFY_DISCRIMINATOR); +} + +export type VerifyInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountRouter extends string | IAccountMeta = string, + TAccountVerifierEntry extends string | IAccountMeta = string, + TAccountVerifierProgram extends string | IAccountMeta = string, + TAccountSystemProgram extends + | string + | IAccountMeta = '11111111111111111111111111111111', + TRemainingAccounts extends readonly IAccountMeta[] = [], +> = IInstruction & + IInstructionWithData & + IInstructionWithAccounts< + [ + TAccountRouter extends string + ? ReadonlyAccount + : TAccountRouter, + TAccountVerifierEntry extends string + ? ReadonlyAccount + : TAccountVerifierEntry, + TAccountVerifierProgram extends string + ? ReadonlyAccount + : TAccountVerifierProgram, + TAccountSystemProgram extends string + ? ReadonlyAccount + : TAccountSystemProgram, + ...TRemainingAccounts, + ] + >; + +export type VerifyInstructionData = { + discriminator: ReadonlyUint8Array; + proof: Proof; + selector: number; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export type VerifyInstructionDataArgs = { + proof: ProofArgs; + selector: number; + imageId: ReadonlyUint8Array; + journalDigest: ReadonlyUint8Array; +}; + +export function getVerifyInstructionDataEncoder(): Encoder { + return transformEncoder( + getStructEncoder([ + ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], + ['proof', getProofEncoder()], + ['selector', getU32Encoder()], + ['imageId', fixEncoderSize(getBytesEncoder(), 32)], + ['journalDigest', fixEncoderSize(getBytesEncoder(), 32)], + ]), + (value) => ({ ...value, discriminator: VERIFY_DISCRIMINATOR }) + ); +} + +export function getVerifyInstructionDataDecoder(): Decoder { + return getStructDecoder([ + ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], + ['proof', getProofDecoder()], + ['selector', getU32Decoder()], + ['imageId', fixDecoderSize(getBytesDecoder(), 32)], + ['journalDigest', fixDecoderSize(getBytesDecoder(), 32)], + ]); +} + +export function getVerifyInstructionDataCodec(): Codec< + VerifyInstructionDataArgs, + VerifyInstructionData +> { + return combineCodec( + getVerifyInstructionDataEncoder(), + getVerifyInstructionDataDecoder() + ); +} + +export type VerifyAsyncInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountVerifierProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing the verifier registry */ + router?: Address; + /** + * The verifier entry to use, validated using PDA derivation + * Seeds are ["verifier", router_pubkey, selector_bytes] + */ + verifierEntry?: Address; + /** The verifier Program account that is matched to the verifier entry */ + verifierProgram: Address; + systemProgram?: Address; + proof: VerifyInstructionDataArgs['proof']; + selector: VerifyInstructionDataArgs['selector']; + imageId: VerifyInstructionDataArgs['imageId']; + journalDigest: VerifyInstructionDataArgs['journalDigest']; +}; + +export async function getVerifyInstructionAsync< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountVerifierProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: VerifyAsyncInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): Promise< + VerifyInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram + > +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: false }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: false }, + verifierProgram: { + value: input.verifierProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.router.value) { + accounts.router.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([114, 111, 117, 116, 101, 114]) + ), + ], + }); + } + if (!accounts.verifierEntry.value) { + accounts.verifierEntry.value = await getProgramDerivedAddress({ + programAddress, + seeds: [ + getBytesEncoder().encode( + new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) + ), + getAddressEncoder().encode(expectAddress(accounts.router.value)), + getU32Encoder().encode(expectSome(args.selector)), + ], + }); + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getVerifyInstructionDataEncoder().encode( + args as VerifyInstructionDataArgs + ), + } as VerifyInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type VerifyInput< + TAccountRouter extends string = string, + TAccountVerifierEntry extends string = string, + TAccountVerifierProgram extends string = string, + TAccountSystemProgram extends string = string, +> = { + /** The router account containing the verifier registry */ + router: Address; + /** + * The verifier entry to use, validated using PDA derivation + * Seeds are ["verifier", router_pubkey, selector_bytes] + */ + verifierEntry: Address; + /** The verifier Program account that is matched to the verifier entry */ + verifierProgram: Address; + systemProgram?: Address; + proof: VerifyInstructionDataArgs['proof']; + selector: VerifyInstructionDataArgs['selector']; + imageId: VerifyInstructionDataArgs['imageId']; + journalDigest: VerifyInstructionDataArgs['journalDigest']; +}; + +export function getVerifyInstruction< + TAccountRouter extends string, + TAccountVerifierEntry extends string, + TAccountVerifierProgram extends string, + TAccountSystemProgram extends string, + TProgramAddress extends Address = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, +>( + input: VerifyInput< + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram + >, + config?: { programAddress?: TProgramAddress } +): VerifyInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram +> { + // Program address. + const programAddress = + config?.programAddress ?? VERIFIER_ROUTER_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + router: { value: input.router ?? null, isWritable: false }, + verifierEntry: { value: input.verifierEntry ?? null, isWritable: false }, + verifierProgram: { + value: input.verifierProgram ?? null, + isWritable: false, + }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record< + keyof typeof originalAccounts, + ResolvedAccount + >; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + const instruction = { + accounts: [ + getAccountMeta(accounts.router), + getAccountMeta(accounts.verifierEntry), + getAccountMeta(accounts.verifierProgram), + getAccountMeta(accounts.systemProgram), + ], + programAddress, + data: getVerifyInstructionDataEncoder().encode( + args as VerifyInstructionDataArgs + ), + } as VerifyInstruction< + TProgramAddress, + TAccountRouter, + TAccountVerifierEntry, + TAccountVerifierProgram, + TAccountSystemProgram + >; + + return instruction; +} + +export type ParsedVerifyInstruction< + TProgram extends string = typeof VERIFIER_ROUTER_PROGRAM_ADDRESS, + TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], +> = { + programAddress: Address; + accounts: { + /** The router account containing the verifier registry */ + router: TAccountMetas[0]; + /** + * The verifier entry to use, validated using PDA derivation + * Seeds are ["verifier", router_pubkey, selector_bytes] + */ + + verifierEntry: TAccountMetas[1]; + /** The verifier Program account that is matched to the verifier entry */ + verifierProgram: TAccountMetas[2]; + systemProgram: TAccountMetas[3]; + }; + data: VerifyInstructionData; +}; + +export function parseVerifyInstruction< + TProgram extends string, + TAccountMetas extends readonly IAccountMeta[], +>( + instruction: IInstruction & + IInstructionWithAccounts & + IInstructionWithData +): ParsedVerifyInstruction { + if (instruction.accounts.length < 4) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = instruction.accounts![accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + router: getNextAccount(), + verifierEntry: getNextAccount(), + verifierProgram: getNextAccount(), + systemProgram: getNextAccount(), + }, + data: getVerifyInstructionDataDecoder().decode(instruction.data), + }; +} diff --git a/solana-verifier/scripts/verify-router/programs/index.ts b/solana-verifier/scripts/verify-router/programs/index.ts new file mode 100644 index 0000000..74b5e70 --- /dev/null +++ b/solana-verifier/scripts/verify-router/programs/index.ts @@ -0,0 +1,9 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './verifierRouter'; diff --git a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts new file mode 100644 index 0000000..1240bfc --- /dev/null +++ b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts @@ -0,0 +1,216 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + containsBytes, + fixEncoderSize, + getBytesEncoder, + type Address, + type ReadonlyUint8Array, +} from '@solana/web3.js'; +import { + type ParsedAcceptOwnershipInstruction, + type ParsedAddVerifierInstruction, + type ParsedCancelTransferInstruction, + type ParsedEmergencyStopInstruction, + type ParsedEmergencyStopWithProofInstruction, + type ParsedInitializeInstruction, + type ParsedRenounceOwnershipInstruction, + type ParsedTransferOwnershipInstruction, + type ParsedVerifyInstruction, +} from '../instructions'; + +export const VERIFIER_ROUTER_PROGRAM_ADDRESS = + '2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK' as Address<'2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK'>; + +export enum VerifierRouterAccount { + VerifierEntry, + VerifierRouter, +} + +export function identifyVerifierRouterAccount( + account: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): VerifierRouterAccount { + const data = 'data' in account ? account.data : account; + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([102, 247, 148, 158, 33, 153, 100, 93]) + ), + 0 + ) + ) { + return VerifierRouterAccount.VerifierEntry; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([188, 46, 30, 54, 25, 63, 197, 26]) + ), + 0 + ) + ) { + return VerifierRouterAccount.VerifierRouter; + } + throw new Error( + 'The provided account could not be identified as a verifierRouter account.' + ); +} + +export enum VerifierRouterInstruction { + AcceptOwnership, + AddVerifier, + CancelTransfer, + EmergencyStop, + EmergencyStopWithProof, + Initialize, + RenounceOwnership, + TransferOwnership, + Verify, +} + +export function identifyVerifierRouterInstruction( + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array +): VerifierRouterInstruction { + const data = 'data' in instruction ? instruction.data : instruction; + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([172, 23, 43, 13, 238, 213, 85, 150]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.AcceptOwnership; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([165, 72, 135, 225, 67, 181, 255, 135]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.AddVerifier; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([50, 32, 70, 130, 142, 41, 111, 175]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.CancelTransfer; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([179, 143, 200, 137, 108, 245, 248, 35]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.EmergencyStop; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([54, 84, 135, 9, 249, 7, 161, 4]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.EmergencyStopWithProof; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([175, 175, 109, 31, 13, 152, 155, 237]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.Initialize; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([19, 143, 91, 79, 34, 168, 174, 125]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.RenounceOwnership; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([65, 177, 215, 73, 53, 45, 99, 47]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.TransferOwnership; + } + if ( + containsBytes( + data, + fixEncoderSize(getBytesEncoder(), 8).encode( + new Uint8Array([133, 161, 141, 48, 120, 198, 88, 150]) + ), + 0 + ) + ) { + return VerifierRouterInstruction.Verify; + } + throw new Error( + 'The provided instruction could not be identified as a verifierRouter instruction.' + ); +} + +export type ParsedVerifierRouterInstruction< + TProgram extends string = '2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK', +> = + | ({ + instructionType: VerifierRouterInstruction.AcceptOwnership; + } & ParsedAcceptOwnershipInstruction) + | ({ + instructionType: VerifierRouterInstruction.AddVerifier; + } & ParsedAddVerifierInstruction) + | ({ + instructionType: VerifierRouterInstruction.CancelTransfer; + } & ParsedCancelTransferInstruction) + | ({ + instructionType: VerifierRouterInstruction.EmergencyStop; + } & ParsedEmergencyStopInstruction) + | ({ + instructionType: VerifierRouterInstruction.EmergencyStopWithProof; + } & ParsedEmergencyStopWithProofInstruction) + | ({ + instructionType: VerifierRouterInstruction.Initialize; + } & ParsedInitializeInstruction) + | ({ + instructionType: VerifierRouterInstruction.RenounceOwnership; + } & ParsedRenounceOwnershipInstruction) + | ({ + instructionType: VerifierRouterInstruction.TransferOwnership; + } & ParsedTransferOwnershipInstruction) + | ({ + instructionType: VerifierRouterInstruction.Verify; + } & ParsedVerifyInstruction); diff --git a/solana-verifier/scripts/verify-router/shared/index.ts b/solana-verifier/scripts/verify-router/shared/index.ts new file mode 100644 index 0000000..01a7d93 --- /dev/null +++ b/solana-verifier/scripts/verify-router/shared/index.ts @@ -0,0 +1,164 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as web3JsIsTransactionSigner, + type Address, + type IAccountMeta, + type IAccountSignerMeta, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, +} from '@solana/web3.js'; + +/** + * Asserts that the given value is not null or undefined. + * @internal + */ +export function expectSome(value: T | null | undefined): T { + if (value == null) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; +} + +/** + * Asserts that the given value is a PublicKey. + * @internal + */ +export function expectAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): Address { + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0]; + } + return value as Address; +} + +/** + * Asserts that the given value is a PDA. + * @internal + */ +export function expectProgramDerivedAddress( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): ProgramDerivedAddress { + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; +} + +/** + * Asserts that the given value is a TransactionSigner. + * @internal + */ +export function expectTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner + | null + | undefined +): TransactionSigner { + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; +} + +/** + * Defines an instruction account to resolve. + * @internal + */ +export type ResolvedAccount< + T extends string = string, + U extends + | Address + | ProgramDerivedAddress + | TransactionSigner + | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, +> = { + isWritable: boolean; + value: U; +}; + +/** + * Defines an instruction that stores additional bytes on-chain. + * @internal + */ +export type IInstructionWithByteDelta = { + byteDelta: number; +}; + +/** + * Get account metas and signers from resolved accounts. + * @internal + */ +export function getAccountMetaFactory( + programAddress: Address, + optionalAccountStrategy: 'omitted' | 'programId' +) { + return ( + account: ResolvedAccount + ): IAccountMeta | IAccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ + address: programAddress, + role: AccountRole.READONLY, + }); + } + + const writableRole = account.isWritable + ? AccountRole.WRITABLE + : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) + ? upgradeRoleToSigner(writableRole) + : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; +} + +export function isTransactionSigner( + value: + | Address + | ProgramDerivedAddress + | TransactionSigner +): value is TransactionSigner { + return ( + !!value && + typeof value === 'object' && + 'address' in value && + web3JsIsTransactionSigner(value) + ); +} diff --git a/solana-verifier/scripts/verify-router/types/emergencyStopEvent.ts b/solana-verifier/scripts/verify-router/types/emergencyStopEvent.ts new file mode 100644 index 0000000..b6f014c --- /dev/null +++ b/solana-verifier/scripts/verify-router/types/emergencyStopEvent.ts @@ -0,0 +1,76 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + addDecoderSizePrefix, + addEncoderSizePrefix, + combineCodec, + getAddressDecoder, + getAddressEncoder, + getStructDecoder, + getStructEncoder, + getU32Decoder, + getU32Encoder, + getUtf8Decoder, + getUtf8Encoder, + type Address, + type Codec, + type Decoder, + type Encoder, +} from '@solana/web3.js'; + +/** + * Event emitted when an emergency stop is executed on a verifier + * + * # Fields + * * `router` - The public key of the router account managing the verifier + * * `selector` - A u32 that uniquely identifies the verifier entry in the router + * * `verifier` - The public key of the verifier program being emergency stopped + * * `triggered_by` - The public key of the account that initiated the emergency stop + * * `reason` - A string explaining why the emergency stop was triggered + */ + +export type EmergencyStopEvent = { + router: Address; + selector: number; + verifier: Address; + triggeredBy: Address; + reason: string; +}; + +export type EmergencyStopEventArgs = EmergencyStopEvent; + +export function getEmergencyStopEventEncoder(): Encoder { + return getStructEncoder([ + ['router', getAddressEncoder()], + ['selector', getU32Encoder()], + ['verifier', getAddressEncoder()], + ['triggeredBy', getAddressEncoder()], + ['reason', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())], + ]); +} + +export function getEmergencyStopEventDecoder(): Decoder { + return getStructDecoder([ + ['router', getAddressDecoder()], + ['selector', getU32Decoder()], + ['verifier', getAddressDecoder()], + ['triggeredBy', getAddressDecoder()], + ['reason', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())], + ]); +} + +export function getEmergencyStopEventCodec(): Codec< + EmergencyStopEventArgs, + EmergencyStopEvent +> { + return combineCodec( + getEmergencyStopEventEncoder(), + getEmergencyStopEventDecoder() + ); +} diff --git a/solana-verifier/scripts/verify-router/types/index.ts b/solana-verifier/scripts/verify-router/types/index.ts new file mode 100644 index 0000000..0dc0c32 --- /dev/null +++ b/solana-verifier/scripts/verify-router/types/index.ts @@ -0,0 +1,11 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +export * from './emergencyStopEvent'; +export * from './ownership'; +export * from './proof'; diff --git a/solana-verifier/scripts/verify-router/types/ownership.ts b/solana-verifier/scripts/verify-router/types/ownership.ts new file mode 100644 index 0000000..2d544de --- /dev/null +++ b/solana-verifier/scripts/verify-router/types/ownership.ts @@ -0,0 +1,71 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + getAddressDecoder, + getAddressEncoder, + getOptionDecoder, + getOptionEncoder, + getStructDecoder, + getStructEncoder, + type Address, + type Codec, + type Decoder, + type Encoder, + type Option, + type OptionOrNullable, +} from '@solana/web3.js'; + +/** + * This structure tracks both the current owner and any pending ownership transfers. + * It's designed to be embedded within Anchor accounts that need ownership functionality. + * This structure is 66 bytes in size. + * + * # Example + * ```rust + * #[account] + * #[derive(Ownable)] + * pub struct TestState { + * pub ownership: Ownership, + * pub data: u64, + * } + * ``` + */ + +export type Ownership = { + /** The current owner's public key */ + owner: Option
; + /** The public key of the pending owner during a transfer, if any */ + pendingOwner: Option
; +}; + +export type OwnershipArgs = { + /** The current owner's public key */ + owner: OptionOrNullable
; + /** The public key of the pending owner during a transfer, if any */ + pendingOwner: OptionOrNullable
; +}; + +export function getOwnershipEncoder(): Encoder { + return getStructEncoder([ + ['owner', getOptionEncoder(getAddressEncoder())], + ['pendingOwner', getOptionEncoder(getAddressEncoder())], + ]); +} + +export function getOwnershipDecoder(): Decoder { + return getStructDecoder([ + ['owner', getOptionDecoder(getAddressDecoder())], + ['pendingOwner', getOptionDecoder(getAddressDecoder())], + ]); +} + +export function getOwnershipCodec(): Codec { + return combineCodec(getOwnershipEncoder(), getOwnershipDecoder()); +} diff --git a/solana-verifier/scripts/verify-router/types/proof.ts b/solana-verifier/scripts/verify-router/types/proof.ts new file mode 100644 index 0000000..e571954 --- /dev/null +++ b/solana-verifier/scripts/verify-router/types/proof.ts @@ -0,0 +1,53 @@ +/** + * This code was AUTOGENERATED using the codama library. + * Please DO NOT EDIT THIS FILE, instead use visitors + * to add features, then rerun codama to update it. + * + * @see https://github.com/codama-idl/codama + */ + +import { + combineCodec, + fixDecoderSize, + fixEncoderSize, + getArrayDecoder, + getArrayEncoder, + getBytesDecoder, + getBytesEncoder, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + type Codec, + type Decoder, + type Encoder, + type ReadonlyUint8Array, +} from '@solana/web3.js'; + +export type Proof = { + piA: ReadonlyUint8Array; + piB: Array; + piC: ReadonlyUint8Array; +}; + +export type ProofArgs = Proof; + +export function getProofEncoder(): Encoder { + return getStructEncoder([ + ['piA', fixEncoderSize(getBytesEncoder(), 64)], + ['piB', getArrayEncoder(getU8Encoder(), { size: 128 })], + ['piC', fixEncoderSize(getBytesEncoder(), 64)], + ]); +} + +export function getProofDecoder(): Decoder { + return getStructDecoder([ + ['piA', fixDecoderSize(getBytesDecoder(), 64)], + ['piB', getArrayDecoder(getU8Decoder(), { size: 128 })], + ['piC', fixDecoderSize(getBytesDecoder(), 64)], + ]); +} + +export function getProofCodec(): Codec { + return combineCodec(getProofEncoder(), getProofDecoder()); +} diff --git a/solana-verifier/tests/new-tests.ts b/solana-verifier/tests/new-tests.ts new file mode 100644 index 0000000..a13e793 --- /dev/null +++ b/solana-verifier/tests/new-tests.ts @@ -0,0 +1,492 @@ +/** + * We rely on starting a local validator and having anchor test deploy programs to it. + * We cannot use a more efficient setup like bankrun because as of this writing it does + * not support upgradable programs which are account closure depends upon: + * - https://github.com/kevinheavey/solana-bankrun/issues/33 + * + * + */ + +import { + fetchVerifierRouter, + getAddVerifierInstruction, + Proof, + getInitializeInstruction, + VERIFIER_ROUTER_PROGRAM_ADDRESS, + getEmergencyStopWithProofInstruction, + getEmergencyStopInstruction, + fetchVerifierEntry, + fetchMaybeVerifierEntry, +} from "../scripts/verify-router"; +import { sendTransaction, loadDefaultKeypair } from "../scripts/utils"; + +// Use the new web3.js, version >=2 +import { + airdropFactory, + createSolanaRpc, + createSolanaRpcSubscriptions, + generateKeyPairSigner, + Rpc, + SolanaRpcApi, + TransactionPartialSigner, + ProgramDerivedAddress, + some, + none, + getU32Codec, + getProgramDerivedAddress, + Address, + ProgramDerivedAddressBump, + RpcSubscriptions, + SolanaRpcSubscriptionsApi, + getAddressCodec, + KeyPairSigner, + BaseTransactionMessage, + SolanaError, + SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, +} from "@solana/web3.js"; + +import { use as chaiUse, expect } from "chai"; +import deepEqualInAnyOrder from "deep-equal-in-any-order"; +import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../scripts/groth16"; +import { TEST_BAD_VERIFIER_PROGRAM_ADDRESS } from "../scripts/bad-verifier"; +import { + getSetAuthorityInstruction, + SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +} from "../scripts/loaderV3"; + +import chaiAsPromised from "chai-as-promised"; +import { getVerifyInstruction } from "../scripts/bad-verifier"; +import { assert } from "node:console"; + +chaiUse(deepEqualInAnyOrder); +chaiUse(chaiAsPromised); + +const LAMPORTS_PER_SOL = 1_000_000_000n; + +async function expectError( + promise: Promise, + errorType: string, + errorMessage?: string, + log: boolean = false +): Promise { + try { + await promise; + expect.fail("should have thrown an exception, but did not"); + } catch (e) { + if (log) { + console.log(e); + } + expect(e.context.logs.toString()).to.include(errorType, errorMessage); + } +} + +describe("verifier-router", () => { + let rpc: Rpc; + let rpcSubscriptions: RpcSubscriptions; + let deployerKeyPair: KeyPairSigner; + + // Test Accounts + let router: ProgramDerivedAddress; + let grothPda: ProgramDerivedAddress; + let grothPDAAddress: Address; + let grothPDABump: ProgramDerivedAddressBump; + let grothProgramDataAddress: Address; + let badVerifierPda: ProgramDerivedAddress; + let badVerifierPDAAddress: Address; + let badVerifierPDABump: ProgramDerivedAddressBump; + let badVerifierProgramDataAddress: Address; + let routerAddress: Address; + let routerBump: ProgramDerivedAddressBump; + let owner: TransactionPartialSigner; + let notOwner: TransactionPartialSigner; + let sendTx: ( + instruction: TTransaction["instructions"][number], + authority?: TransactionPartialSigner + ) => Promise; + + // Test Proof for the Test Bad Verifier + const emptyProof: Proof = { + piA: new Uint8Array(64), // Empty 64 Byte array + piB: new Array(128), // Empty 128 byte array + piC: new Uint8Array(64), // Empty 64 byte array + }; + + const emptyJournalDigest = new Uint8Array(32); // Empty Journal Digest + const emptyImageId = new Uint8Array(32); // Empty Image ID + const badImageId = new Uint8Array(32).fill(1); // Non-empty Image ID + + // Test selectors + const GROTH16_SELECTOR = 1; + const TEST_BAD_SELECTOR = 2; + + before(async () => { + rpc = createSolanaRpc("http://localhost:8899"); + rpcSubscriptions = createSolanaRpcSubscriptions("ws://localhost:8900"); + + // Get information about Deployment + deployerKeyPair = await loadDefaultKeypair(); + + // Generate fresh signers for each test + const signers = await Promise.all([ + generateKeyPairSigner(), + generateKeyPairSigner(), + ]); + owner = signers[0]; + notOwner = signers[1]; + + // Calculate the PDA for the Router Program + router = await getProgramDerivedAddress({ + programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, + seeds: ["router"], + }); + + routerAddress = router[0]; + routerBump = router[1]; + + // Calculate the PDA for the Groth16 Verifier Program + const router_seed_address = getAddressCodec().encode(routerAddress); + const groth_seed_selector = getU32Codec().encode(GROTH16_SELECTOR); + const groth16_seed_address = getAddressCodec().encode( + GROTH16_VERIFIER_PROGRAM_ADDRESS + ); + grothPda = await getProgramDerivedAddress({ + programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, + seeds: ["verifier", router_seed_address, groth_seed_selector], + }); + + const grothProgramData = await getProgramDerivedAddress({ + programAddress: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + seeds: [groth16_seed_address], + }); + + grothPDAAddress = grothPda[0]; + grothPDABump = grothPda[1]; + + console.log(`Groth Verifier (Verifier Entry) Address: ${grothPDAAddress}`); + + grothProgramDataAddress = grothProgramData[0]; + console.log(`Groth Program Data: ${grothProgramData}`); + + // Calculate the PDA for the TestBadVerifier Program + const bad_verifier_seed_selector = getU32Codec().encode(TEST_BAD_SELECTOR); + const bad_verifier_seed_address = getAddressCodec().encode( + TEST_BAD_VERIFIER_PROGRAM_ADDRESS + ); + + badVerifierPda = await getProgramDerivedAddress({ + programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, + seeds: ["verifier", router_seed_address, bad_verifier_seed_selector], + }); + + badVerifierPDAAddress = badVerifierPda[0]; + badVerifierPDABump = badVerifierPda[1]; + + console.log( + `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}` + ); + + const badVerifierProgramData = await getProgramDerivedAddress({ + programAddress: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + seeds: [bad_verifier_seed_address], + }); + + badVerifierProgramDataAddress = badVerifierProgramData[0]; + }); + + beforeEach(async () => { + const requestAirdrop = airdropFactory({ rpc, rpcSubscriptions }); + // Create a closure to reduce the ammount of duplicate code needed to send a transaction + sendTx = async (instruction, authority = owner) => + sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: authority, + instruction, + commitment: "confirmed", + }); + + // Airdrop SOL to owner for transactions + await requestAirdrop({ + lamports: 2n * LAMPORTS_PER_SOL, + recipientAddress: owner.address, + commitment: "confirmed", + }); + + // Airdrop SOL to owner for transactions + await requestAirdrop({ + lamports: 2n * LAMPORTS_PER_SOL, + recipientAddress: notOwner.address, + commitment: "confirmed", + }); + }); + + it("Initializes the router with correct owner", async () => { + const transactionInstruction = getInitializeInstruction({ + router: routerAddress, + authority: owner, + }); + + await sendTx(transactionInstruction); + + const account = await fetchVerifierRouter(rpc, routerAddress); + expect(account.data.ownership.owner).to.deep.equal(some(owner.address)); + expect(account.data.ownership.pendingOwner).to.deep.equal(none()); + expect(account.data.verifierCount).to.equal(0); + }); + + it("Should not allow a verifier to be added to the router, that the router does not have upgrade authority over", async () => { + const transactionInstruction = getAddVerifierInstruction({ + authority: owner, + router: routerAddress, + selector: GROTH16_SELECTOR, + verifierEntry: grothPDAAddress, + verifierProgramData: grothProgramDataAddress, + verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, + }); + + await expectError( + sendTx(transactionInstruction), + "VerifierInvalidAuthority" + ); + }); + + it("Set Router as upgrade authority of testBadVerifier", async () => { + const badVerifierUpgradeTransaction = getSetAuthorityInstruction({ + bufferOrProgramDataAccount: badVerifierProgramDataAddress, + currentAuthority: deployerKeyPair, + newAuthority: routerAddress, + }); + + await sendTx(badVerifierUpgradeTransaction); + }); + + it("Sholud not allow a user to pass in a different ProgramData account then the one for the verifier being added", async () => { + const addBadVerifierInstruction = getAddVerifierInstruction({ + authority: owner, + router: routerAddress, + selector: GROTH16_SELECTOR, + verifierEntry: grothPDAAddress, + verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, + verifierProgramData: badVerifierProgramDataAddress, // Wrong PDA (which has the router has authority over), + }); + + await expectError( + sendTx(addBadVerifierInstruction), + "ConstraintSeeds", + "Expected to get a Constraint Seeds error, but did not" + ); + }); + + it("Set Router as upgrade authority of groth16verifier", async () => { + const grothUpgradeTransaction = getSetAuthorityInstruction({ + bufferOrProgramDataAccount: grothProgramDataAddress, + currentAuthority: deployerKeyPair, + newAuthority: routerAddress, + }); + + await sendTx(grothUpgradeTransaction); + }); + + it("Should not allow a non-owner to add a verifier to the router", async () => { + const addGrothInstruction = getAddVerifierInstruction({ + authority: notOwner, + router: routerAddress, + selector: GROTH16_SELECTOR, + verifierEntry: grothPDAAddress, + verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, + verifierProgramData: grothProgramDataAddress, + }); + + await expectError( + sendTx(addGrothInstruction), + "NotOwner", + "A non-owner was able to add a verifier to the router" + ); + }); + + it("Should not allow a verifier to be added with an out of order selector", async () => { + const addBadVerifierInstruction = getAddVerifierInstruction({ + authority: owner, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + verifierEntry: badVerifierPDAAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + verifierProgramData: badVerifierProgramDataAddress, + }); + + await expectError( + sendTx(addBadVerifierInstruction), + "SelectorInvalid", + "Was expecting an Invalid Selector Error" + ); + }); + + it("Should allow a verifier to be added to the router after the upgrade authority is correctly set", async () => { + const addGrothInstruction = getAddVerifierInstruction({ + authority: owner, + router: routerAddress, + selector: GROTH16_SELECTOR, + verifierEntry: grothPDAAddress, + verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, + verifierProgramData: grothProgramDataAddress, + }); + + const addBadVerifierInstruction = getAddVerifierInstruction({ + authority: owner, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + verifierEntry: badVerifierPDAAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + verifierProgramData: badVerifierProgramDataAddress, + }); + + let routerAccount = await fetchVerifierRouter(rpc, routerAddress); + expect(routerAccount.data.verifierCount).to.equal(0); + + // We must do these sequentially so that we don't hit a race condition on selector numbers + await sendTx(addGrothInstruction); + + routerAccount = await fetchVerifierRouter(rpc, routerAddress); + expect(routerAccount.data.verifierCount).to.equal(1); + + const grothAccount = await fetchVerifierEntry(rpc, grothPDAAddress); + expect(grothAccount.data.router).to.equal(routerAddress); + expect(grothAccount.data.selector).to.equal(GROTH16_SELECTOR); + expect(grothAccount.data.verifier).to.equal( + GROTH16_VERIFIER_PROGRAM_ADDRESS + ); + + await sendTx(addBadVerifierInstruction); + + const badAccount = await fetchVerifierEntry(rpc, badVerifierPDAAddress); + expect(badAccount.data.router).to.equal(routerAddress); + expect(badAccount.data.selector).to.equal(TEST_BAD_SELECTOR); + expect(badAccount.data.verifier).to.equal( + TEST_BAD_VERIFIER_PROGRAM_ADDRESS + ); + + routerAccount = await fetchVerifierRouter(rpc, routerAddress); + expect(routerAccount.data.verifierCount).to.equal(2); + }); + + it("should allow a user to submit a valid proof to the verifier", async () => { + // The Bad verifier will only accept proofs for null inputs + + const verifyInstruction = getVerifyInstruction({ + imageId: emptyImageId, + journalDigest: emptyJournalDigest, + ...emptyProof, + }); + + await sendTx(verifyInstruction); + }); + + it("should allow a user to submit an invalid proof to the verifier that returns an error", async () => { + // The Bad verifier will only accept proofs for null inputs + + const verifyInstruction = getVerifyInstruction({ + imageId: badImageId, + journalDigest: emptyJournalDigest, + ...emptyProof, + }); + + await expectError( + sendTx(verifyInstruction), + "VerificationError", + "Expected to hit a Verification Error but the transaction did not error out." + ); + }); + + it("should not allow any user to call e-stop if they do not have a valid proof the verifier is broken", async () => { + const estopProofInstruction = getEmergencyStopWithProofInstruction({ + authority: notOwner, + bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + imageId: badImageId, + journalDigest: emptyJournalDigest, + proof: emptyProof, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + verifierEntry: badVerifierPDAAddress, + verifierProgramData: badVerifierProgramDataAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + }); + + await expectError( + sendTx(estopProofInstruction), + "VerificationError", + "Was expecting the estop call to fail but it did not" + ); + }); + + it("should not allow someone other then owner to call estop by owner", async () => { + const estopProofInstruction = getEmergencyStopInstruction({ + authority: notOwner, + bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + verifierEntry: badVerifierPDAAddress, + verifierProgramData: badVerifierProgramDataAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + }); + + await expectError(sendTx(estopProofInstruction), "NotOwner"); + }); + + it("should allow any user to call e-stop if they have proof the verifier is broken", async () => { + const estopProofInstruction = getEmergencyStopWithProofInstruction({ + authority: notOwner, + bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + imageId: emptyImageId, + journalDigest: emptyJournalDigest, + proof: emptyProof, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + verifierEntry: badVerifierPDAAddress, + verifierProgramData: badVerifierProgramDataAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + }); + + await sendTx(estopProofInstruction); + + const verifierEntry = await fetchMaybeVerifierEntry( + rpc, + badVerifierPDAAddress + ); + expect(verifierEntry.exists).to.equal(false); + + const routerAccount = await fetchVerifierRouter(rpc, routerAddress); + expect(routerAccount.data.verifierCount).to.equal(2); + }); + + it("Should allow an owner to call estop", async () => { + const estopProofInstruction = getEmergencyStopInstruction({ + authority: owner, + bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + router: routerAddress, + selector: GROTH16_SELECTOR, + verifierEntry: grothPDAAddress, + verifierProgramData: grothProgramDataAddress, + verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, + }); + + await sendTx(estopProofInstruction).catch((error) => console.log(error)); + + const verifierEntry = await fetchMaybeVerifierEntry(rpc, grothPDAAddress); + expect(verifierEntry.exists).to.equal(false); + + const routerAccount = await fetchVerifierRouter(rpc, routerAddress); + expect(routerAccount.data.verifierCount).to.equal(2); + }); + + it("should not allow a user to submit a valid proof to the verifier after e-stop was called on it", async () => { + // The Bad verifier will only accept proofs for null inputs + + const verifyInstruction = getVerifyInstruction({ + imageId: emptyImageId, + journalDigest: emptyJournalDigest, + ...emptyProof, + }); + + await expectError(sendTx(verifyInstruction), "Program is not deployed"); + }); +}); diff --git a/solana-verifier/tsconfig.json b/solana-verifier/tsconfig.json new file mode 100644 index 0000000..0afbfc2 --- /dev/null +++ b/solana-verifier/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai", "node"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2020"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true, + "resolveJsonModule": true + } +} diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock new file mode 100644 index 0000000..02c5402 --- /dev/null +++ b/solana-verifier/yarn.lock @@ -0,0 +1,1939 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.25.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + +"@codama/errors@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/errors/-/errors-1.1.0.tgz#3ee488f2a597a0508881b0759a486f5b96434d1a" + integrity sha512-njLWTPYgz5uJP02617CX0BZCHGHrHnQvKroU0z4YcJZiaMQlw3VLzb+e2ZU2X+uVpp+3ITJZ9yexuoEhJBVQdQ== + dependencies: + "@codama/node-types" "1.1.0" + chalk "^5.3.0" + commander "^12.1.0" + +"@codama/node-types@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/node-types/-/node-types-1.1.0.tgz#8223d3cb67386ec9617cb04627abecdbcd8ce8ee" + integrity sha512-+J6E0didCY0+8dr2vI6ag+FMaMr3SemvXJYKOhxKEJ6HXR/J+7cddpptXyrIhLa8R2Kw0yzIG9VjAlUGL7u8OQ== + +"@codama/nodes-from-anchor@1.0.1", "@codama/nodes-from-anchor@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz#e3243ccb480e658b28c639ba99777ad35c8ae13a" + integrity sha512-9sITAJyWxjbuBqeSmiA/AzN15+65KvycPJmc0ReWWsbqBCblr0A5jeA/zFbfILRFcu6MVyJXpQvl42FZ/vAL1g== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors" "1.1.0" + "@noble/hashes" "^1.5.0" + +"@codama/nodes@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/nodes/-/nodes-1.1.0.tgz#cc843b6b8be8ee7fbdd6eaad57dd37b55a30b90d" + integrity sha512-a6lX45CqfvdU5jKx63zWVEUbyAjEKqjye3EkboKNEJIM0RDmDwtTqNuQBR8HHx9nO7EBPypxYOXtGpmVXg0xYw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/node-types" "1.1.0" + +"@codama/renderers-core@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@codama/renderers-core/-/renderers-core-1.0.1.tgz#0a0a526498c0f766d43e14786d7780386b37eeed" + integrity sha512-EOOQx2s5t6huVJRXwwLC6adyqSuDPVKIWXiDhy5uyJBRlNk18/vb4OmVoXTIWb6mS64m/j0DuyrWJWzIUUJ84w== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + +"@codama/renderers-js-umi@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/renderers-js-umi/-/renderers-js-umi-1.1.0.tgz#7af94c5fac6c799365addf02330a346a618a920d" + integrity sha512-PxHuvRlqD2jwK3QtK/eKGZ8QmRx8htcSEM8ylZWwsgs4Wtd7LZgEZezwrzTpSgGPcH3PWoYyBRfER8Q3XwrcDA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/renderers-core" "1.0.1" + "@codama/validators" "1.1.0" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + prettier "^3.3.3" + +"@codama/renderers-js@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/renderers-js/-/renderers-js-1.1.0.tgz#4c479771dcb18ca4b2e677e6a5fd69ed145665d2" + integrity sha512-LeFLDlKb726q6VARnuKCQ0qV2c0xS6s7U1jF7WrecMj3zrWy5hN1yGKKEZdItq95M0JOawbHbejjP9aiJ4R7Kw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/nodes-from-anchor" "1.0.1" + "@codama/renderers-core" "1.0.1" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + prettier "^3.3.3" + +"@codama/renderers-rust@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@codama/renderers-rust/-/renderers-rust-1.0.4.tgz#6a64cba990803ff5b7cc14a2d977804ceb4b6bc5" + integrity sha512-+THq6bCInn30dKEGGNrilnbaitA8A3pOjfsqwka/i3Aip5x5At6lk7VcQwoWzDvvcy/2FHaOVi3hmlc28d8maw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/renderers-core" "1.0.1" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + +"@codama/renderers@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@codama/renderers/-/renderers-1.0.4.tgz#0bd80a953543a8de8d49349c793e3b8e63f740dc" + integrity sha512-4M1RGHFOoaZrbABiFREtcL3pEITxnOlVJIeMwzWY5wDE+v8C1eT6LLP6GjjljZY9FmJXrRSzTJsXbWwBzYLhKw== + dependencies: + "@codama/renderers-js" "1.1.0" + "@codama/renderers-js-umi" "1.1.0" + "@codama/renderers-rust" "1.0.4" + +"@codama/validators@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/validators/-/validators-1.1.0.tgz#804b5d0e44ed977ab82d6df0daf8ca8f68f2c23f" + integrity sha512-TVzTjN2m1bGauLnqJE12lZfZf1L2C9Hal7/i0sjNmtc3UbUL7pIH5Rp4bFSyfDuyhMD0JfxtJqr3YlK6yXoqkA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + +"@codama/visitors-core@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/visitors-core/-/visitors-core-1.1.0.tgz#b7aaf5ca92fabb91a480458cb61046c0e3b39cc9" + integrity sha512-NBJAgGmVdFIWHDsKSKjTYbIfSZRyRzgqPzmHFgRIRjy4Uw63zOwP5Yk1bctWrP6YRlGjrTunfVkOIA6QiVr6lg== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + json-stable-stringify "^1.1.1" + +"@codama/visitors@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/visitors/-/visitors-1.1.0.tgz#22ec6e0be2b3babc9cc74e80ed6a64af84f71fbb" + integrity sha512-QpAShuxemS8oplHDXNqnUnYwhJq58RZjfZ/KMIpdm88OCBnQRO4YfM/zQLEvXjA+tpwJpe4WnL6opTLLnSYThw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + +"@coral-xyz/anchor-errors@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz" + integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== + +"@coral-xyz/anchor@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz" + integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== + dependencies: + "@coral-xyz/anchor-errors" "^0.30.1" + "@coral-xyz/borsh" "^0.30.1" + "@noble/hashes" "^1.3.1" + "@solana/web3.js" "^1.68.0" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + +"@coral-xyz/borsh@^0.30.1": + version "0.30.1" + resolved "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz" + integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + +"@noble/curves@^1.4.2": + version "1.6.0" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz" + integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== + dependencies: + "@noble/hashes" "1.5.0" + +"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + +"@noble/hashes@^1.5.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + +"@solana/accounts@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/accounts/-/accounts-2.0.0-rc.4.tgz#f6529f291e92cc95eafb5b549e79ea8997088902" + integrity sha512-LRznpCi1v/c+Gfp7/6t/kWDzTRZAPmzyr1Id3uRFsjOqGgeHYtdsK7Jw+9KMmO+PUrHqdRIFISZNMty/T17h4g== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/addresses@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/addresses/-/addresses-2.0.0-rc.4.tgz#13ca6dce9bf131d4990ea72f66624b041ac15166" + integrity sha512-AR9g6pZMqCZeH/dShmaqyTQRCgWtZpYPQZYMazA6I5EsrKq1A40Cfxqgb/iMNl/g3vfVunT25UASH3YwBQyL/A== + dependencies: + "@solana/assertions" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/assertions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/assertions/-/assertions-2.0.0-rc.4.tgz#0c6e921aa9b560c269a76a4a00bf15dbdbc1c0f8" + integrity sha512-CkTwoysagNAOjWynNzvrS5842/uDhEBjRbmgYRFurbWNLjo62j3eTYJKgTcMml7nc564Y4gObC5lUwWShGMZ/A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/codecs-core@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.4.tgz#c4280d68877a078df4b430871db159f95534fcd3" + integrity sha512-JIrTSps032mSE3wBxW3bXOqWfoy4CMy1CX/XeVCijyh5kLVxZTSDIdRTYdePdL1yzaOZF1Xysvt1DhOUgBdM+A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-data-structures@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.4.tgz#0a435341901d72c48ef56b6e7ed335c71e4e323c" + integrity sha512-smF4Z4WCbr3ppoZhhT7/e5XMG6VFSHFPDLsayt4aHUvP1clZAew5uOy0qLY0qdxbttSmfoxXqf2SUFpJw8Jadg== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-numbers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.4.tgz#ad95848d64dbaab4f6f0935d042df00802c84bba" + integrity sha512-ZJR7TaUO65+3Hzo3YOOUCS0wlzh17IW+j0MZC2LCk1R0woaypRpHKj4iSMYeQOZkMxsd9QT3WNvjFrPC2qA6Sw== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-strings@2.0.0-rc.4", "@solana/codecs-strings@rc": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.4.tgz#6a9223c074ab2422a7da3a8fc60cd398c6b8e167" + integrity sha512-LGfK2RL0BKjYYUfzu2FG/gTgCsYOMz9FKVs2ntji6WneZygPxJTV5W98K3J8Rl0JewpCSCFQH3xjLSHBJUS0fA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.4.tgz#d47a442e3da5d6109694a321e2a23f1b36fb8fe1" + integrity sha512-h9GQGYLfBifzLhyZuef5FUaZGxLW7JNLDlEYCErA7x7Ty2ssF98sswsLsWKcbv5Cz1QsW7A6xGv4PCjvIDOCxQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/options" "2.0.0-rc.4" + +"@solana/errors@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.4.tgz#4a5aa0d82206b07f31e729262f47def34397ac61" + integrity sha512-0PPaMyB81keEHG/1pnyEuiBVKctbXO641M2w3CIOrYT/wzjunfF0FTxsqq9wYJeYo0AyiefCKGgSPs6wiY2PpQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@solana/fast-stable-stringify@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0-rc.4.tgz#13cc3e8366fb60d4952f62c561f914c874240fef" + integrity sha512-5N4S+/EGZw0Y6s2aQPNTpiB2yii2oOcrfPKXSkK4ZR2GqZuA6u6BJiJeUelXeB8P24KMxOZXfzCrkBBpEzYt6w== + +"@solana/functional@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/functional/-/functional-2.0.0-rc.4.tgz#0d8cb83806ee54fd65bbf8e517183e75c6f54d6c" + integrity sha512-P/rL15Svl4sREO7tqQ6V/E8zPAlIBGBnA0T75gZYGoSY5644rCiEaFoqyMkXc9l563lj1B5vV5UU8FCPkpPwmQ== + +"@solana/instructions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/instructions/-/instructions-2.0.0-rc.4.tgz#42fe4a305c5c34c9d325e3a2461efe5f8b8956f7" + integrity sha512-k4KcNfrWQX5Zhij9mn6d10MnHEP4YD9qsG8SQHWTELbyoZt3UjzfzG2aY88ao3VDWz3S9JbFIzA11wjJ0TYFxg== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/keys@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/keys/-/keys-2.0.0-rc.4.tgz#7d438918b4d0d374bd4d2526fb184c9140e7ccdc" + integrity sha512-EcepAutaXVwiW0bQZMv2gSUd+gjxL8FrqzX+BeqkfNNe1c4GxtLHOlASOXhPEH/3iGEaz6mfV6Bn5KkctWOeEA== + dependencies: + "@solana/assertions" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/options@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.4.tgz#f6f6fd8b8f6f25605f5ee0e03e526128e7364462" + integrity sha512-5W8aswMBhcdv2pD5lHLdHIZ98ymhQNBmeFncEoVZLTrshf7KqyxZ8xtILcWNCUgOev1+yp9hMTNV9SEgrgyNrQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/programs@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/programs/-/programs-2.0.0-rc.4.tgz#d2f9fd36a705094ad47d784c00085cb5860e7323" + integrity sha512-aIspYII4+EdOtK2EZaTSYNVxSzn0R1b9Lir7S+PftmzVMLOP3R5MhVb5IJcZRByJngfW227CyKQXh34fg2wWOg== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/promises@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/promises/-/promises-2.0.0-rc.4.tgz#3e01502cff67ba473c3544d6a9cbd71eb853bdf2" + integrity sha512-NIY7rdtpw+le0P2vgXigJiGI54fE/bLpyiIKHfyYyjyTzCph8TmoHPX2Y/mmkmlri54tu5BM/X0UbIoXVi2dpw== + +"@solana/rpc-api@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-api/-/rpc-api-2.0.0-rc.4.tgz#7bd5378fdb82b0b857f97d6f2f48d46b522694d1" + integrity sha512-z6KyTvVd0WkXb8WhuLAF3vLstdGl5+FVQTgxu1BbBD94bBEUC8Zg7sZuT0AS/Qdgo4Bt/oNcgXsD2DbFmb0HpQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-parsed-types" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/rpc-parsed-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0-rc.4.tgz#eac850b5c1e94f836a051c0bdcaf337ca65604fa" + integrity sha512-UvNcfi5S6WI54/t7TFi1sgdvl9wFLnk7Rmwsuq/UksAx9FuN+bdZvywkXYioh5PkcZxaDTaupnNoGRPDFxW87g== + +"@solana/rpc-spec-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0-rc.4.tgz#23f4bb949607318e5ba954e3d1fb9eb47d3a9d6e" + integrity sha512-xmyh8+xvOcm6OgxFzHNLNWs8zSjV1xOFrTtE4g44QArmzEYylzoP9bFBUEoaZvBG9ACAvT2scvwhUEREFXRAWg== + +"@solana/rpc-spec@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec/-/rpc-spec-2.0.0-rc.4.tgz#e2f5b1937db90074e17b2164befa2e1ced3be2b2" + integrity sha512-SuME1MDYwotEDCBh0gKV50Zp2IJE/gEZc04MZBgEtEsyqB8mg9DL7PRSANJhGtx7b5gX31xw5sJmGlPHp/oUEA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-api@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0-rc.4.tgz#14ff6358a048a7a242d31ef96a08dc721b79d9a2" + integrity sha512-4TOOlYGIOqKI3vBRjQz8dZYKjExQhBUDrO1USOUm/s6GAMkNY5TVmlqvQxzo7BlsJu8f7cpK8RrQap/Ej9jHOQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-channel-websocket@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0-rc.4.tgz#43db37b4b60eecc7b3c589201cfe7ab40ea50d04" + integrity sha512-Rj8vb+f5gXrJ2KBA1+gJ1eXnjawG2vNtuL/WWd/CD1xEzmBV9oFXbzcGG7tTLsQWSM9+BcgiMGhhKg5DCnpWcQ== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-spec@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0-rc.4.tgz#9cd92e70cb2d1ee3f6e2eca6fabe00007894489c" + integrity sha512-B0C8TYiErD34YMgdk9fmbzTti8Xo8JFYuF/2acFRD1WPLVE3UrEJSjxrmj7Lv/bO40wHvWrhUtHtzo37s9anAA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-subscriptions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0-rc.4.tgz#8a294a5ddd59f8e381275beae25444de6a654b47" + integrity sha512-9fRn2/mr6a+7hknWaqA39lSN2hO1qOIQzaOz7zql5Gj1jKM5yorgqlXBdTuCi6pRn5zni9c4yz8fU6jVJQZnGA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/fast-stable-stringify" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-subscriptions-api" "2.0.0-rc.4" + "@solana/rpc-subscriptions-channel-websocket" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-transformers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-transformers/-/rpc-transformers-2.0.0-rc.4.tgz#4c34d6493552e577f4ad0e967d387bc13e18a398" + integrity sha512-KpLkW6V/eAuQvZCdvCCNvcYQvq8XCxwCNmY6Y+ZJYU4EWCdMppGe4p+JJVL6buRRSGrTBW+muLhKKDsZdx/4VQ== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/rpc-transport-http@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0-rc.4.tgz#38bf5d2d99a62ca3d8c1f670239f4465b9df6bc9" + integrity sha512-Xu6+uEPYHPF8gAJ6KsmGXqtA02Dbv9mKykf0nazt91YP66k4HYF8PaYLbGSrNR76o4TewdbqFJlipSceMJb86w== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + undici-types "^6.20.0" + +"@solana/rpc-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-types/-/rpc-types-2.0.0-rc.4.tgz#3991da33e98ea0e692d5477443cdd302f98bb04e" + integrity sha512-uSWW/VndwYF29gpvKxWo0skTxrsCKl+fYmeJz5mduIULjhr5SFdgchgb4KCcAlUMgFn4HJuwALJVHpUg0Wv10Q== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/rpc@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc/-/rpc-2.0.0-rc.4.tgz#fa27311279a0ea1be844e47432d22ac6880118cb" + integrity sha512-YqQPf1raKUdle6iiEPQavaCdXCaX2XxHJIeZQ93lTvwuntoQUK8yAbT4go6eYQRwgL2SnR/0C4p5fnv8f/vR/A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/fast-stable-stringify" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-api" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-transport-http" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/signers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/signers/-/signers-2.0.0-rc.4.tgz#58fa869d8e0c5cb07a1ea1f19fa01c0f45d86208" + integrity sha512-4Wm8BsXkEpiomgmsthOregxIJibL2KIzMp2NbsTQMuzB3HzRv6ATtHoiQACqnsUm0hfTV217lE/GeJdYyqHCIA== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/subscribable@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/subscribable/-/subscribable-2.0.0-rc.4.tgz#cdeacd725bb9966f64bb90d8a02a24b717a51000" + integrity sha512-ZMEL0P/kdpKeqpPI/r/zV0aCqpA2LKzd94DVOSHgDGRFWfvotRl197PInU5rcsFH1VmPsuoFH68SZYV4+2DC9Q== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/sysvars@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/sysvars/-/sysvars-2.0.0-rc.4.tgz#aabf458ed5f143fbe03f3d45ad6bcdc3d5d87a71" + integrity sha512-z4XVv308IQL9RkGDPkACr2GHUrM/czzsXuv1kUscfmZmvmY77RQqaC85UYow0+opghnDpmEEssZRaWjMeVvkYw== + dependencies: + "@solana/accounts" "2.0.0-rc.4" + "@solana/codecs" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/transaction-confirmation@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0-rc.4.tgz#8852d796ac0b79d09ec8622602c28153cdd6b18f" + integrity sha512-ImBMZ+vkMglDECUEr8SFZw+V0Bm5TrCmNUAMqlfOgGO8v8pQUaVql0V9/KjiXu12TUYEcDZqp0PDLQ+D4I8aFg== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc" "2.0.0-rc.4" + "@solana/rpc-subscriptions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/transaction-messages@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transaction-messages/-/transaction-messages-2.0.0-rc.4.tgz#7098a744ca6a1f63961eaa1b59a7701d330b07d9" + integrity sha512-zdeNIb6EtD9faVzEEfXm7Td+u5ifNCxF1/QBF6oURxaUcfX7bGXJ/P3VM0wAQ80t5zBQeqm2qzUkfEvf07NllQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/transactions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transactions/-/transactions-2.0.0-rc.4.tgz#7246fa19e760d636ff60fb0d8eedc6df365c126a" + integrity sha512-n2TQ59S/SQ+LCyTgOZNXGT9gYMbMj+XeH2eMXFbg6ETs7Bhn0DE1lIfHQCq9m6JQEJ2lgH9NYFU+QDd3LGLUog== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + +"@solana/web3.js@^1.68.0": + version "1.95.5" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz" + integrity sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + +"@solana/web3.js@^2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-2.0.0-rc.4.tgz#6fe711939ed0f0977cf42b7fa8fa0d706958a82d" + integrity sha512-w1r5MjLd+6roeqMc0Dght4tLco3W9Zdoq56FnSKnbcP7Ji/L6VTdFJttf8vaIAAMDyUH5aH1yLxHrqCIW1kbrw== + dependencies: + "@solana/accounts" "2.0.0-rc.4" + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/programs" "2.0.0-rc.4" + "@solana/rpc" "2.0.0-rc.4" + "@solana/rpc-parsed-types" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-subscriptions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/signers" "2.0.0-rc.4" + "@solana/sysvars" "2.0.0-rc.4" + "@solana/transaction-confirmation" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@swc/helpers@^0.5.11": + version "0.5.13" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz" + integrity sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w== + dependencies: + tslib "^2.4.0" + +"@types/bn.js@^5.1.0": + version "5.1.6" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== + dependencies: + "@types/node" "*" + +"@types/chai-as-promised@^7.1.2": + version "7.1.8" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" + integrity sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw== + dependencies: + "@types/chai" "*" + +"@types/chai@*": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.0.1.tgz#2c3705555cf11f5f59c836a84c44afcfe4e5689d" + integrity sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA== + dependencies: + "@types/deep-eql" "*" + +"@types/chai@^4.3.0": + version "4.3.20" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz" + integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== + +"@types/connect@^3.4.33": + version "3.4.38" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/deep-eql@*": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" + integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/mocha@^9.0.0": + version "9.1.1" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@types/node@*": + version "22.8.1" + resolved "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz" + integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== + dependencies: + undici-types "~6.19.8" + +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/node@^22.10.0": + version "22.10.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.0.tgz#89bfc9e82496b9c7edea3382583fa94f75896e81" + integrity sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA== + dependencies: + undici-types "~6.20.0" + +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@types/ws@^8.2.2": + version "8.5.12" + resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + dependencies: + "@types/node" "*" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +a-sync-waterfall@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" + integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== + +agentkeepalive@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== + +asap@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.10" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@~3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-layout@^1.2.0, buffer-layout@^1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" + integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== + +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bufferutil@^4.0.1: + version "4.0.8" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + +call-bind@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +camelcase@^6.0.0, camelcase@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chai-as-promised@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" + integrity sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw== + dependencies: + check-error "^1.0.2" + +chai@^4.3.4: + version "4.5.0" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.1.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +check-error@^1.0.2, check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +codama@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/codama/-/codama-1.1.0.tgz#7f452b3821bb7589d8ee7a7e55fb62a80e8638b4" + integrity sha512-dr0iTND6q9goY0CwNmX5tk53iJ/KhziN/js/x2g4Dvl5K6tUGy+iR20yeBYw8lq1rwUDIocOEgKVq/HcKOI9yA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/validators" "1.1.0" + "@codama/visitors" "1.1.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + +commander@^2.20.3: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + +crypto-hash@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" + integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== + +debug@4.3.3: + version "4.3.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + +deep-equal-in-any-order@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/deep-equal-in-any-order/-/deep-equal-in-any-order-2.0.6.tgz#9fb208dfc6836e35e2d4c942db85fc291820318a" + integrity sha512-RfnWHQzph10YrUjvWwhd15Dne8ciSJcZ3U6OD7owPwiVwsdE5IFSoZGg8rlwJD11ES+9H5y8j3fCofviRHOqLQ== + dependencies: + lodash.mapvalues "^4.6.0" + sort-any "^2.0.0" + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + +jayson@^4.1.1: + version "4.1.2" + resolved "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-stable-stringify@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.mapvalues@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@^9.0.3: + version "9.2.2" + resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.3" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + growl "1.10.5" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" + ms "2.1.3" + nanoid "3.3.1" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + workerpool "6.2.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.0.0: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-fetch@^2.6.12, node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.3.0: + version "4.8.2" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz" + integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +nunjucks@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" + integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== + dependencies: + a-sync-waterfall "^1.0.0" + asap "^2.0.3" + commander "^5.1.0" + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +pako@^2.0.3: + version "2.1.0" + resolved "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prettier@^2.6.2: + version "2.8.8" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +prettier@^3.3.3: + version "3.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.1.tgz#e211d451d6452db0a291672ca9154bc8c2579f7b" + integrity sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +solana-bankrun-darwin-arm64@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-arm64/-/solana-bankrun-darwin-arm64-0.4.0.tgz#eb0f3dfffb1675f6329a1e026b12d09222b33986" + integrity sha512-6dz78Teoz7ez/3lpRLDjktYLJb79FcmJk2me4/YaB8WiO6W43OdExU4h+d2FyuAryO2DgBPXaBoBNY/8J1HJmw== + +solana-bankrun-darwin-universal@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-universal/-/solana-bankrun-darwin-universal-0.4.0.tgz#0ac13ec7637b334b1030e6f51abecc50a254b5de" + integrity sha512-zSSw/Jx3KNU42pPMmrEWABd0nOwGJfsj7nm9chVZ3ae7WQg3Uty0hHAkn5NSDCj3OOiN0py9Dr1l9vmRJpOOxg== + +solana-bankrun-darwin-x64@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-x64/-/solana-bankrun-darwin-x64-0.4.0.tgz#f863c5a668858b7c44be51376bd05fb077c11c99" + integrity sha512-LWjs5fsgHFtyr7YdJR6r0Ho5zrtzI6CY4wvwPXr8H2m3b4pZe6RLIZjQtabCav4cguc14G0K8yQB2PTMuGub8w== + +solana-bankrun-linux-x64-gnu@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-linux-x64-gnu/-/solana-bankrun-linux-x64-gnu-0.4.0.tgz#30fd7edaf3ff6585468138d3bed6eaed37878d9e" + integrity sha512-SrlVrb82UIxt21Zr/XZFHVV/h9zd2/nP25PMpLJVLD7Pgl2yhkhfi82xj3OjxoQqWe+zkBJ+uszA0EEKr67yNw== + +solana-bankrun-linux-x64-musl@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-linux-x64-musl/-/solana-bankrun-linux-x64-musl-0.4.0.tgz#3c870218140b1307dc44b51d2282697c99f2e1e4" + integrity sha512-Nv328ZanmURdYfcLL+jwB1oMzX4ZzK57NwIcuJjGlf0XSNLq96EoaO5buEiUTo4Ls7MqqMyLbClHcrPE7/aKyA== + +solana-bankrun@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun/-/solana-bankrun-0.4.0.tgz#a48a7a74ce6c56be4ec7e200336026f65e90b8dc" + integrity sha512-NMmXUipPBkt8NgnyNO3SCnPERP6xT/AMNMBooljGA3+rG6NN8lmXJsKeLqQTiFsDeWD74U++QM/DgcueSWvrIg== + dependencies: + "@solana/web3.js" "^1.68.0" + bs58 "^4.0.1" + optionalDependencies: + solana-bankrun-darwin-arm64 "0.4.0" + solana-bankrun-darwin-universal "0.4.0" + solana-bankrun-darwin-x64 "0.4.0" + solana-bankrun-linux-x64-gnu "0.4.0" + solana-bankrun-linux-x64-musl "0.4.0" + +sort-any@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-any/-/sort-any-2.0.0.tgz#62a5409c9905c9483f03e41e17f46cc451aa7c55" + integrity sha512-T9JoiDewQEmWcnmPn/s9h/PH9t3d/LSWi0RgVmXSuDYeZXTZOZ1/wrK2PHaptuR1VXe3clLLt0pD6sgVOwjNEA== + dependencies: + lodash "^4.17.21" + +source-map-support@^0.5.6: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +text-encoding-utf-8@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" + integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toml@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz" + integrity sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +tsconfig-paths@^3.5.0: + version "3.15.0" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^2.0.3, tslib@^2.4.0: + version "2.8.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz" + integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== + +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + +typescript@^4.3.5: + version "4.9.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +undici-types@^6.20.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + +undici-types@~6.19.8: + version "6.19.8" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz" + integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 5b53990..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,835 +0,0 @@ -// Copyright 2024 RISC Zero, Inc. -// -// 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. - -use borsh::BorshSerialize; -use risc0_zkp::core::digest::Digest; -use solana_program::alt_bn128::prelude::{ - alt_bn128_addition, alt_bn128_multiplication, alt_bn128_pairing, -}; -use solana_program::entrypoint::ProgramResult; -use solana_program::program_error::ProgramError; - -#[derive(Debug)] -pub enum Risc0SolanaError { - G1CompressionError, - G2CompressionError, - VerificationError, - InvalidPublicInput, - ArithmeticError, - PairingError, -} - -const G1_LEN: usize = 64; -const G2_LEN: usize = 128; - -// Base field modulus `q` for BN254 -// https://docs.rs/ark-bn254/latest/ark_bn254/ -pub(crate) const BASE_FIELD_MODULUS_Q: [u8; 32] = [ - 0x30, 0x64, 0x4E, 0x72, 0xE1, 0x31, 0xA0, 0x29, 0xB8, 0x50, 0x45, 0xB6, 0x81, 0x81, 0x58, 0x5D, - 0x97, 0x81, 0x6A, 0x91, 0x68, 0x71, 0xCA, 0x8D, 0x3C, 0x20, 0x8C, 0x16, 0xD8, 0x7C, 0xFD, 0x47, -]; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Proof { - // NOTE: `pi_a` is expected to be the **negated** - // version of the proof element. - // - // The pairing equation for Groth16 verification is: - // - // e(-pi_a, vk_beta_g2) * e(vk_alpha_g1, pi_b) * e(prepared_input, vk_gamma_g2) * e(pi_c, vk_delta_g2) == 1 - pub pi_a: [u8; 64], - pub pi_b: [u8; 128], - pub pi_c: [u8; 64], -} - -#[derive(Debug, Clone, PartialEq, Eq, BorshSerialize)] -pub struct VerificationKey<'a> { - pub nr_pubinputs: u32, - pub vk_alpha_g1: [u8; G1_LEN], - pub vk_beta_g2: [u8; G2_LEN], - pub vk_gamma_g2: [u8; G2_LEN], - pub vk_delta_g2: [u8; G2_LEN], - pub vk_ic: &'a [[u8; G1_LEN]], -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct PublicInputs { - pub inputs: [[u8; 32]; N], -} - -impl From for ProgramError { - fn from(error: Risc0SolanaError) -> Self { - ProgramError::Custom(error as u32) - } -} - -/// Verifies a Groth16 proof. -/// -/// # Arguments -/// -/// * `proof` - The proof to verify. -/// * `public` - The public inputs to the proof. -/// * `vk` - The verification key. -/// -/// Note: The proof's `pi_a` element is expected to be the negated version of the proof element. -/// Ensure that `pi_a` has been negated before calling this function. -/// -/// # Returns -/// -/// * `Ok(())` if the proof is valid. -/// * `Err(ProgramError)` if the proof is invalid or an error occurs. -pub fn verify_proof( - proof: &Proof, - public: &PublicInputs, - vk: &VerificationKey, -) -> ProgramResult { - // Check vk_ic is the correct length - if vk.vk_ic.len() != N_PUBLIC + 1 { - return Err(Risc0SolanaError::InvalidPublicInput.into()); - } - // Prepare public inputs - let mut prepared = vk.vk_ic[0]; - for (i, input) in public.inputs.iter().enumerate() { - if !is_scalar_valid(input) { - return Err(Risc0SolanaError::InvalidPublicInput.into()); - } - let mul_res = alt_bn128_multiplication(&[&vk.vk_ic[i + 1][..], &input[..]].concat()) - .map_err(|_| Risc0SolanaError::ArithmeticError)?; - prepared = alt_bn128_addition(&[&mul_res[..], &prepared[..]].concat()) - .unwrap() - .try_into() - .map_err(|_| Risc0SolanaError::ArithmeticError)?; - } - - // Perform pairing check - let pairing_input = [ - proof.pi_a.as_slice(), - proof.pi_b.as_slice(), - prepared.as_slice(), - vk.vk_gamma_g2.as_slice(), - proof.pi_c.as_slice(), - vk.vk_delta_g2.as_slice(), - vk.vk_alpha_g1.as_slice(), - vk.vk_beta_g2.as_slice(), - ] - .concat(); - - // Use the Solana alt_bn128_pairing syscall. - // - // The `alt_bn128_pairing` function does not return the actual pairing result. - // Instead, it returns a 32-byte big-endian integer: - // - If the pairing check passes, it returns 1 represented as a 32-byte big-endian integer (`[0u8; 31] + [1u8]`). - // - If the pairing check fails, it returns 0 represented as a 32-byte big-endian integer (`[0u8; 32]`). - let pairing_res = - alt_bn128_pairing(&pairing_input).map_err(|_| Risc0SolanaError::PairingError)?; - - let mut expected = [0u8; 32]; - expected[31] = 1; - - if pairing_res != expected { - return Err(Risc0SolanaError::VerificationError.into()); - } - - Ok(()) -} - -pub fn public_inputs( - claim_digest: [u8; 32], - allowed_control_root: &str, - bn254_identity_control_id: &str, -) -> Result, ProgramError> { - let allowed_control_root: Digest = digest_from_hex(allowed_control_root); - let bn254_identity_control_id: Digest = digest_from_hex(bn254_identity_control_id); - - let (a0, a1) = - split_digest_bytes(allowed_control_root).map_err(|_| ProgramError::InvalidAccountData)?; - let (c0, c1) = split_digest_bytes(Digest::from(claim_digest)) - .map_err(|_| ProgramError::InvalidAccountData)?; - - let mut id_bn554 = bn254_identity_control_id.as_bytes().to_vec(); - id_bn554.reverse(); - let id_bn254_fr = to_fixed_array(&id_bn554); - - let inputs = [a0, a1, c0, c1, id_bn254_fr]; - - Ok(PublicInputs { inputs }) -} - -fn digest_from_hex(hex_str: &str) -> Digest { - let bytes = hex::decode(hex_str).expect("Invalid hex string"); - Digest::from_bytes(bytes.try_into().expect("Invalid digest length")) -} - -fn split_digest_bytes(d: Digest) -> Result<([u8; 32], [u8; 32]), anyhow::Error> { - let big_endian: Vec = d.as_bytes().iter().rev().copied().collect(); - let middle = big_endian.len() / 2; - let (b, a) = big_endian.split_at(middle); - Ok((to_fixed_array(a), to_fixed_array(b))) -} - -fn to_fixed_array(input: &[u8]) -> [u8; 32] { - assert!(input.len() <= 32, "Input length must not exceed 32 bytes"); - - let mut fixed_array = [0u8; 32]; - let start_index = 32 - input.len(); - - fixed_array[start_index..].copy_from_slice(input); - fixed_array -} - -fn is_scalar_valid(scalar: &[u8; 32]) -> bool { - for (s_byte, q_byte) in scalar.iter().zip(BASE_FIELD_MODULUS_Q.iter()) { - match s_byte.cmp(q_byte) { - std::cmp::Ordering::Less => return true, // scalar < q - std::cmp::Ordering::Greater => return false, // scalar > q - std::cmp::Ordering::Equal => continue, // check next - } - } - false // scalar == q -} - -#[cfg(not(target_os = "solana"))] -pub mod client { - - use super::*; - use { - anyhow::{anyhow, Error, Result}, - ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate}, - num_bigint::BigUint, - serde::{Deserialize, Deserializer, Serialize}, - solana_program::alt_bn128::compression::prelude::convert_endianness, - std::{convert::TryInto, fs::File, io::Write}, - }; - - type G1 = ark_bn254::g1::G1Affine; - type G2 = ark_bn254::g2::G2Affine; - - #[derive(Deserialize, Serialize, Debug, PartialEq)] - struct ProofJson { - pi_a: Vec, - pi_b: Vec>, - pi_c: Vec, - protocol: String, - curve: String, - } - - #[derive(Deserialize, Serialize, Debug, PartialEq)] - struct VerifyingKeyJson { - protocol: String, - curve: String, - #[serde(rename = "nPublic")] - nr_pubinputs: u32, - vk_alpha_1: Vec, - vk_beta_2: Vec>, - vk_gamma_2: Vec>, - vk_delta_2: Vec>, - #[serde(rename = "IC")] - vk_ic: Vec>, - } - - impl<'de> Deserialize<'de> for VerificationKey<'_> { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let json = VerifyingKeyJson::deserialize(deserializer)?; - VerificationKey::try_from(json).map_err(serde::de::Error::custom) - } - } - - impl<'de, const N: usize> Deserialize<'de> for PublicInputs { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let inputs: Vec = - as serde::Deserialize>::deserialize(deserializer)?; - PublicInputs::try_from(inputs).map_err(serde::de::Error::custom) - } - } - - impl Serialize for VerificationKey<'_> { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let json = self.to_json().map_err(serde::ser::Error::custom)?; - json.serialize(serializer) - } - } - - impl Serialize for PublicInputs { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let strings: Vec = self - .inputs - .iter() - .map(|input| BigUint::from_bytes_be(input).to_string()) - .collect(); - serde::Serialize::serialize(&strings, serializer) - } - } - - impl<'a> TryFrom for VerificationKey<'a> { - type Error = Error; - - fn try_from(json: VerifyingKeyJson) -> Result { - let vk_ic: Vec<[u8; G1_LEN]> = json - .vk_ic - .iter() - .map(|ic| convert_g1(ic)) - .collect::, _>>()?; - - let vk_ic_box = Box::new(vk_ic); - let vk_ic_ref: &'a [[u8; G1_LEN]] = Box::leak(vk_ic_box); - - Ok(VerificationKey { - nr_pubinputs: json.nr_pubinputs, - vk_alpha_g1: convert_g1(&json.vk_alpha_1)?, - vk_beta_g2: convert_g2(&json.vk_beta_2)?, - vk_gamma_g2: convert_g2(&json.vk_gamma_2)?, - vk_delta_g2: convert_g2(&json.vk_delta_2)?, - vk_ic: vk_ic_ref, - }) - } - } - - impl TryFrom> for PublicInputs { - type Error = Error; - - fn try_from(inputs: Vec) -> Result { - if inputs.len() != N { - return Err(anyhow!("Invalid number of public inputs")); - } - - let parsed_inputs = inputs - .into_iter() - .map(|input| { - let biguint = BigUint::parse_bytes(input.as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse input: {}", input))?; - let mut bytes = [0u8; 32]; - let be_bytes = biguint.to_bytes_be(); - bytes[32 - be_bytes.len()..].copy_from_slice(&be_bytes); - Ok(bytes) - }) - .collect::, Error>>()?; - - Ok(PublicInputs { - inputs: parsed_inputs - .try_into() - .map_err(|_| anyhow!("Conversion failed"))?, - }) - } - } - - impl<'a> VerificationKey<'a> { - fn to_json(&self) -> Result { - Ok(VerifyingKeyJson { - protocol: "groth16".to_string(), - curve: "bn128".to_string(), - nr_pubinputs: self.nr_pubinputs, - vk_alpha_1: export_g1(&self.vk_alpha_g1), - vk_beta_2: export_g2(&self.vk_beta_g2), - vk_gamma_2: export_g2(&self.vk_gamma_g2), - vk_delta_2: export_g2(&self.vk_delta_g2), - vk_ic: self.vk_ic.iter().map(export_g1).collect(), - }) - } - } - - impl<'de> Deserialize<'de> for Proof { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let json = ProofJson::deserialize(deserializer)?; - Proof::try_from(json).map_err(serde::de::Error::custom) - } - } - - impl Serialize for Proof { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let json = self.to_json().map_err(serde::ser::Error::custom)?; - json.serialize(serializer) - } - } - - impl TryFrom for Proof { - type Error = Error; - - fn try_from(json: ProofJson) -> Result { - Ok(Proof { - pi_a: convert_g1(&json.pi_a)?, - pi_b: convert_g2(&json.pi_b)?, - pi_c: convert_g1(&json.pi_c)?, - }) - } - } - - impl Proof { - fn to_json(&self) -> Result { - Ok(ProofJson { - pi_a: export_g1(&self.pi_a), - pi_b: export_g2(&self.pi_b), - pi_c: export_g1(&self.pi_c), - protocol: "groth16".to_string(), - curve: "bn128".to_string(), - }) - } - - pub fn to_bytes(&self) -> [u8; 256] { - let mut bytes = [0u8; 256]; - bytes[..64].copy_from_slice(&self.pi_a); - bytes[64..192].copy_from_slice(&self.pi_b); - bytes[192..].copy_from_slice(&self.pi_c); - bytes - } - } - - pub(crate) fn convert_g1(values: &[String]) -> Result<[u8; G1_LEN]> { - if values.len() != 3 { - return Err(anyhow!( - "Invalid G1 point: expected 3 values, got {}", - values.len() - )); - } - - let x = BigUint::parse_bytes(values[0].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G1 x coordinate"))?; - let y = BigUint::parse_bytes(values[1].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G1 y coordinate"))?; - let z = BigUint::parse_bytes(values[2].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G1 z coordinate"))?; - - // check that z == 1 - if z != BigUint::from(1u8) { - return Err(anyhow!( - "Invalid G1 point: Z coordinate is not 1 (found {})", - z - )); - } - - let mut result = [0u8; G1_LEN]; - let x_bytes = x.to_bytes_be(); - let y_bytes = y.to_bytes_be(); - - result[32 - x_bytes.len()..32].copy_from_slice(&x_bytes); - result[G1_LEN - y_bytes.len()..].copy_from_slice(&y_bytes); - - Ok(result) - } - - pub(crate) fn convert_g2(values: &[Vec]) -> Result<[u8; G2_LEN]> { - if values.len() != 3 || values[0].len() != 2 || values[1].len() != 2 || values[2].len() != 2 - { - return Err(anyhow!("Invalid G2 point structure")); - } - - let x_c0 = BigUint::parse_bytes(values[0][0].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 x.c0"))?; - let x_c1 = BigUint::parse_bytes(values[0][1].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 x.c1"))?; - let y_c0 = BigUint::parse_bytes(values[1][0].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 y.c0"))?; - let y_c1 = BigUint::parse_bytes(values[1][1].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 y.c1"))?; - - // check z == [1, 0] - let z_c0 = BigUint::parse_bytes(values[2][0].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 z.c0"))?; - let z_c1 = BigUint::parse_bytes(values[2][1].as_bytes(), 10) - .ok_or_else(|| anyhow!("Failed to parse G2 z.c1"))?; - - if z_c0 != BigUint::from(1u8) || z_c1 != BigUint::from(0u8) { - return Err(anyhow!( - "Invalid G2 point: Z coordinate is not [1, 0] (found [{}, {}])", - z_c0, - z_c1 - )); - } - - let mut result = [0u8; G2_LEN]; - let x_c1_bytes = x_c1.to_bytes_be(); - let x_c0_bytes = x_c0.to_bytes_be(); - let y_c1_bytes = y_c1.to_bytes_be(); - let y_c0_bytes = y_c0.to_bytes_be(); - - result[32 - x_c1_bytes.len()..32].copy_from_slice(&x_c1_bytes); - result[64 - x_c0_bytes.len()..64].copy_from_slice(&x_c0_bytes); - result[96 - y_c1_bytes.len()..96].copy_from_slice(&y_c1_bytes); - result[G2_LEN - y_c0_bytes.len()..].copy_from_slice(&y_c0_bytes); - - Ok(result) - } - - fn export_g1(bytes: &[u8; G1_LEN]) -> Vec { - let x = BigUint::from_bytes_be(&bytes[..32]); - let y = BigUint::from_bytes_be(&bytes[32..]); - vec![x.to_string(), y.to_string(), "1".to_string()] - } - - fn export_g2(bytes: &[u8; G2_LEN]) -> Vec> { - let x_c1 = BigUint::from_bytes_be(&bytes[..32]); - let x_c0 = BigUint::from_bytes_be(&bytes[32..64]); - let y_c1 = BigUint::from_bytes_be(&bytes[64..96]); - let y_c0 = BigUint::from_bytes_be(&bytes[96..]); - vec![ - vec![x_c0.to_string(), x_c1.to_string()], - vec![y_c0.to_string(), y_c1.to_string()], - vec!["1".to_string(), "0".to_string()], - ] - } - - pub fn write_to_file(filename: &str, proof: &Proof) { - let mut file = File::create(filename).expect("Failed to create file"); - file.write_all(&proof.pi_a) - .expect("Failed to write proof_a"); - file.write_all(&proof.pi_b) - .expect("Failed to write proof_b"); - file.write_all(&proof.pi_c) - .expect("Failed to write proof_c"); - } - - pub fn write_compressed_proof_to_file(filename: &str, proof: &[u8]) { - let mut file = File::create(filename).expect("Failed to create file"); - file.write_all(proof).expect("Failed to write proof"); - } - - pub fn compress_g1_be(g1: &[u8; 64]) -> [u8; 32] { - let g1 = convert_endianness::<32, 64>(g1); - let mut compressed = [0u8; 32]; - let g1 = G1::deserialize_with_mode(g1.as_slice(), Compress::No, Validate::Yes).unwrap(); - G1::serialize_with_mode(&g1, &mut compressed[..], Compress::Yes).unwrap(); - convert_endianness::<32, 32>(&compressed) - } - - pub fn compress_g2_be(g2: &[u8; 128]) -> [u8; 64] { - let g2: [u8; 128] = convert_endianness::<64, 128>(g2); - let mut compressed = [0u8; 64]; - let g2 = G2::deserialize_with_mode(g2.as_slice(), Compress::No, Validate::Yes).unwrap(); - G2::serialize_with_mode(&g2, &mut compressed[..], Compress::Yes).unwrap(); - convert_endianness::<64, 64>(&compressed) - } - - pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], Error> { - let x = &point[..32]; - let y = &point[32..]; - - let mut y_big = BigUint::from_bytes_be(y); - let field_modulus = BigUint::from_bytes_be(&BASE_FIELD_MODULUS_Q); - - // Negate the y-coordinate to get -g1. - y_big = field_modulus - y_big; - - // Reconstruct the point with the negated y-coordinate - let mut result = [0u8; 64]; - result[..32].copy_from_slice(x); - let y_bytes = y_big.to_bytes_be(); - result[64 - y_bytes.len()..].copy_from_slice(&y_bytes); - - Ok(result) - } -} - -#[cfg(test)] -mod test_lib { - use super::client::*; - use super::*; - use risc0_zkvm::sha::Digestible; - use risc0_zkvm::Receipt; - use std::fs::File; - use std::io::Write; - - // From: https://github.com/risc0/risc0/blob/v1.1.1/risc0/circuit/recursion/src/control_id.rs#L47 - const ALLOWED_CONTROL_ROOT: &str = - "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; - const BN254_IDENTITY_CONTROL_ID: &str = - "4e160df1e119ac0e3d658755a9edf38c8feb307b34bc10b57f4538dbe122a005"; - - // Reference base field modulus for BN254 - // https://docs.rs/ark-bn254/latest/ark_bn254/ - const REF_BASE_FIELD_MODULUS: &str = - "21888242871839275222246405745257275088696311157297823662689037894645226208583"; - - fn load_receipt_and_extract_data() -> (Receipt, Proof, PublicInputs<5>) { - let receipt_json_str = include_bytes!("../test/data/receipt.json"); - let receipt: Receipt = serde_json::from_slice(receipt_json_str).unwrap(); - - let claim_digest = receipt - .inner - .groth16() - .unwrap() - .claim - .digest() - .try_into() - .unwrap(); - let public_inputs = public_inputs( - claim_digest, - ALLOWED_CONTROL_ROOT, - BN254_IDENTITY_CONTROL_ID, - ) - .unwrap(); - - let proof_raw = &receipt.inner.groth16().unwrap().seal; - let mut proof = Proof { - pi_a: proof_raw[0..64].try_into().unwrap(), - pi_b: proof_raw[64..192].try_into().unwrap(), - pi_c: proof_raw[192..256].try_into().unwrap(), - }; - proof.pi_a = negate_g1(&proof.pi_a).unwrap(); - - (receipt, proof, public_inputs) - } - - fn load_verification_key() -> VerificationKey<'static> { - let vk_json_str = include_str!("../test/data/r0_test_vk.json"); - serde_json::from_str(vk_json_str).unwrap() - } - - #[test] - fn test_convert_g1_invalid_z() { - let values = vec![ - "1".to_string(), // x - "2".to_string(), // y - "0".to_string(), // z (invalid) - ]; - - let result = convert_g1(&values); - - assert!( - result.is_err(), - "Expected error due to invalid Z coordinate" - ); - assert_eq!( - result.unwrap_err().to_string(), - "Invalid G1 point: Z coordinate is not 1 (found 0)" - ); - } - - #[test] - fn test_convert_g2_invalid_z() { - let values = vec![ - vec!["1".to_string(), "2".to_string()], // x - vec!["3".to_string(), "4".to_string()], // y - vec!["0".to_string(), "0".to_string()], // z (invalid) - ]; - - let result = convert_g2(&values); - - assert!( - result.is_err(), - "Expected error due to invalid Z coordinate" - ); - assert_eq!( - result.unwrap_err().to_string(), - "Invalid G2 point: Z coordinate is not [1, 0] (found [0, 0])" - ); - } - - #[test] - fn test_import() { - let vk = load_verification_key(); - println!("Verification Key: {:?}", vk); - } - - #[test] - fn test_roundtrip() { - let vk = load_verification_key(); - - let exported_json = serde_json::to_string(&vk).unwrap(); - let reimported_vk: VerificationKey = serde_json::from_str(&exported_json).unwrap(); - - assert_eq!(vk, reimported_vk, "Roundtrip serialization failed"); - } - - #[test] - fn test_verify_proof_with_invalid_vk_ic_length() { - let (_, proof, public_inputs) = load_receipt_and_extract_data(); - let mut vk = load_verification_key(); - - vk.vk_ic = &vk.vk_ic[..vk.vk_ic.len() - 1]; // Remove one element - - let result = verify_proof(&proof, &public_inputs, &vk); - - assert!(matches!( - result, - Err(ProgramError::Custom(code)) if code == Risc0SolanaError::InvalidPublicInput as u32 - )); - } - - #[test] - fn test_public_inputs() { - let (_, _, public_inputs) = load_receipt_and_extract_data(); - println!("{:?}", public_inputs); - - // Test roundtrip - let exported_json = serde_json::to_string(&public_inputs).unwrap(); - println!("{:?}", exported_json); - let reimported_inputs: PublicInputs<5> = serde_json::from_str(&exported_json).unwrap(); - assert_eq!( - public_inputs, reimported_inputs, - "Public Inputs roundtrip failed" - ); - } - - #[test] - fn test_proof() { - let (_, proof, _) = load_receipt_and_extract_data(); - println!("{:?}", proof); - - // Convert to bytes - let proof_bytes = proof.to_bytes(); - - println!("PROOF: {:?}", proof_bytes); - - // Check that we have 256 bytes - assert_eq!(proof_bytes.len(), 256); - - // Test roundtrip - let exported_json = serde_json::to_string(&proof).unwrap(); - let reimported_proof: Proof = serde_json::from_str(&exported_json).unwrap(); - assert_eq!(proof, reimported_proof, "Proof roundtrip failed"); - - println!("Proof bytes: {:?}", proof_bytes); - } - - #[test] - pub fn test_verify() { - let (_, proof, public_inputs) = load_receipt_and_extract_data(); - let vk = load_verification_key(); - let res = verify_proof(&proof, &public_inputs, &vk); - assert!(res.is_ok(), "Verification failed"); - } - - #[test] - fn test_write_compressed_proof_to_file() { - let (_, proof, _) = load_receipt_and_extract_data(); - - let compressed_proof_a = compress_g1_be(&proof.pi_a); - let compressed_proof_b = compress_g2_be(&proof.pi_b); - let compressed_proof_c = compress_g1_be(&proof.pi_c); - - let compressed_proof = [ - compressed_proof_a.as_slice(), - compressed_proof_b.as_slice(), - compressed_proof_c.as_slice(), - ] - .concat(); - - write_compressed_proof_to_file("test/data/compressed_proof.bin", &compressed_proof); - } - - #[test] - fn write_claim_digest_to_file() { - let claim_digest = get_claim_digest(); - - let output_path = "test/data/claim_digest.bin"; - - let mut file = File::create(output_path).expect("Failed to create file"); - file.write_all(&claim_digest) - .expect("Failed to write claim digest to file"); - - println!("Raw claim digest written to {:?}", output_path); - - // Verify the file was written correctly - let read_digest = std::fs::read(output_path).expect("Failed to read claim digest file"); - assert_eq!( - claim_digest.to_vec(), - read_digest, - "Written and read claim digests do not match" - ); - } - - fn get_claim_digest() -> [u8; 32] { - let receipt_json_str = include_bytes!("../test/data/receipt.json"); - let receipt: Receipt = serde_json::from_slice(receipt_json_str).unwrap(); - receipt - .inner - .groth16() - .unwrap() - .claim - .digest() - .try_into() - .unwrap() - } - - #[test] - fn test_verify_proof_vk_ic_length() { - let (_, proof, public_inputs) = load_receipt_and_extract_data(); - let vk = load_verification_key(); - - let result = verify_proof(&proof, &public_inputs, &vk); - assert!( - result.is_ok(), - "Verification should pass with correct vk_ic length" - ); - - let incorrect_vk_ic: Vec<[u8; G1_LEN]> = vk.vk_ic[..vk.vk_ic.len() - 1].to_vec(); - let incorrect_vk_ic_box = Box::new(incorrect_vk_ic); - let incorrect_vk_ic_ref: &'static [[u8; G1_LEN]] = Box::leak(incorrect_vk_ic_box); - - let mut incorrect_vk = vk.clone(); - incorrect_vk.vk_ic = incorrect_vk_ic_ref; - - let result = verify_proof(&proof, &public_inputs, &incorrect_vk); - assert!( - matches!( - result, - Err(ProgramError::Custom(code)) if code == Risc0SolanaError::InvalidPublicInput as u32 - ), - "Verification should fail with incorrect vk_ic length" - ); - } - - #[test] - fn test_scalar_validity_check() { - let valid_scalar = [0u8; 32]; - assert!(is_scalar_valid(&valid_scalar), "Zero should be valid"); - - let mut invalid_scalar = BASE_FIELD_MODULUS_Q; - assert!(!is_scalar_valid(&invalid_scalar), "q should be invalid"); - - invalid_scalar[31] += 1; - assert!(!is_scalar_valid(&invalid_scalar), "q+1 should be invalid"); - - let mut below_q = BASE_FIELD_MODULUS_Q; - below_q[31] -= 1; - assert!(is_scalar_valid(&below_q), "q-1 should be valid"); - } - - #[test] - fn test_base_field_modulus_against_reference() { - use num_bigint::BigUint; - - let ref_base_field_modulus = BigUint::parse_bytes(REF_BASE_FIELD_MODULUS.as_bytes(), 10) - .expect("Failed to parse BASE_FIELD_MODULUS"); - - let ref_base_field_modulus_hex = format!("{:X}", ref_base_field_modulus); - - let field_modulus_q_hex: String = BASE_FIELD_MODULUS_Q - .iter() - .map(|b| format!("{:02X}", b)) - .collect(); - - assert_eq!( - field_modulus_q_hex, ref_base_field_modulus_hex, - "FIELD_MODULUS_Q does not match reference REF_BASE_FIELD_MODULUS" - ); - } -} From c1ac99ce69611e55e85fb62a5131269385eea6c3 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sun, 15 Dec 2024 02:19:50 -0700 Subject: [PATCH 02/21] Scripts still need testing but most everything except fireblocks is here. --- solana-examples/Cargo.lock | 2457 ----------------- solana-examples/hello-world/host/Cargo.toml | 8 +- .../programs/solana-examples/src/lib.rs | 80 +- solana-verifier/.gitignore | 1 + solana-verifier/Anchor.toml | 9 +- solana-verifier/package.json | 7 +- .../programs/groth_16_verifier/src/lib.rs | 2 +- .../programs/test_bad_verifier/src/lib.rs | 2 +- .../programs/verifier_router/src/lib.rs | 2 +- solana-verifier/scripts/acceptOwnership.ts | 24 + solana-verifier/scripts/addVerifier.ts | 51 + solana-verifier/scripts/deploy.ts | 79 + solana-verifier/scripts/estop.ts | 60 + .../scripts/renounceOwnership copy.ts | 42 + solana-verifier/scripts/transferOwnership.ts | 31 + solana-verifier/scripts/utils.ts | 99 - solana-verifier/scripts/utils/addVerifier.ts | 89 + solana-verifier/scripts/utils/deploy.ts | 75 + solana-verifier/scripts/utils/estop.ts | 80 + solana-verifier/scripts/utils/init.ts | 68 + solana-verifier/scripts/utils/ownership.ts | 175 ++ solana-verifier/scripts/utils/test.ts | 0 solana-verifier/scripts/utils/utils.ts | 329 +++ solana-verifier/yarn.lock | 10 + 24 files changed, 1188 insertions(+), 2592 deletions(-) delete mode 100644 solana-examples/Cargo.lock create mode 100644 solana-verifier/scripts/acceptOwnership.ts create mode 100644 solana-verifier/scripts/addVerifier.ts create mode 100644 solana-verifier/scripts/deploy.ts create mode 100644 solana-verifier/scripts/estop.ts create mode 100644 solana-verifier/scripts/renounceOwnership copy.ts create mode 100644 solana-verifier/scripts/transferOwnership.ts delete mode 100644 solana-verifier/scripts/utils.ts create mode 100644 solana-verifier/scripts/utils/addVerifier.ts create mode 100644 solana-verifier/scripts/utils/deploy.ts create mode 100644 solana-verifier/scripts/utils/estop.ts create mode 100644 solana-verifier/scripts/utils/init.ts create mode 100644 solana-verifier/scripts/utils/ownership.ts create mode 100644 solana-verifier/scripts/utils/test.ts create mode 100644 solana-verifier/scripts/utils/utils.ts diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock deleted file mode 100644 index 9bc17e1..0000000 --- a/solana-examples/Cargo.lock +++ /dev/null @@ -1,2457 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anchor-attribute-access-control" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" -dependencies = [ - "anchor-syn", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-account" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" -dependencies = [ - "anchor-syn", - "bs58 0.5.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-constant" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" -dependencies = [ - "anchor-syn", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-error" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" -dependencies = [ - "anchor-syn", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-event" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" -dependencies = [ - "anchor-syn", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-program" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" -dependencies = [ - "anchor-lang-idl", - "anchor-syn", - "anyhow", - "bs58 0.5.1", - "heck", - "proc-macro2", - "quote", - "serde_json", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-accounts" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" -dependencies = [ - "anchor-syn", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-serde" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" -dependencies = [ - "anchor-syn", - "borsh-derive-internal 0.10.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-space" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-lang" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" -dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-program", - "anchor-derive-accounts", - "anchor-derive-serde", - "anchor-derive-space", - "anchor-lang-idl", - "arrayref", - "base64 0.21.7", - "bincode", - "borsh 0.10.4", - "bytemuck", - "getrandom 0.2.15", - "solana-program", - "thiserror", -] - -[[package]] -name = "anchor-lang-idl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" -dependencies = [ - "anchor-lang-idl-spec", - "anyhow", - "heck", - "regex", - "serde", - "serde_json", - "sha2 0.10.8", -] - -[[package]] -name = "anchor-lang-idl-spec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" -dependencies = [ - "anyhow", - "serde", -] - -[[package]] -name = "anchor-syn" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" -dependencies = [ - "anyhow", - "bs58 0.5.1", - "cargo_toml", - "heck", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2 0.10.8", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "anyhow" -version = "1.0.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -dependencies = [ - "serde", -] - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "blake3" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[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 = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" -dependencies = [ - "borsh-derive 0.10.4", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" -dependencies = [ - "borsh-derive 1.5.3", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" -dependencies = [ - "borsh-derive-internal 0.10.4", - "borsh-schema-derive-internal 0.10.4", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" -dependencies = [ - "once_cell", - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "bytemuck" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cargo_toml" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" -dependencies = [ - "serde", - "toml 0.8.19", -] - -[[package]] -name = "cc" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" -dependencies = [ - "jobserver", - "libc", - "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 = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "console_log" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[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 = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[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 = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "docker-generate" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf673e0848ef09fa4aeeba78e681cf651c0c7d35f76ee38cec8e55bc32fa111" - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elf" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "groth_16_verifier" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "anyhow", - "ark-bn254", - "ark-serialize", - "borsh 1.5.3", - "hex", - "num-bigint", - "num-traits", - "risc0-zkp", - "serde", - "solana-program", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.11", -] - -[[package]] -name = "hashbrown" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac", -] - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.1", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - -[[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 = "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 = "libc" -version = "0.2.164" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.6.0", - "libc", -] - -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "light-poseidon" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" -dependencies = [ - "ark-bn254", - "ark-ff", - "num-bigint", - "thiserror", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[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 = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "metal" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" -dependencies = [ - "bitflags 2.6.0", - "block", - "core-graphics-types", - "foreign-types", - "log", - "objc", - "paste", -] - -[[package]] -name = "methods" -version = "0.1.0" -dependencies = [ - "risc0-build", -] - -[[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", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[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 = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ownable" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "ownable-macro", -] - -[[package]] -name = "ownable-macro" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[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 0.52.6", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml 0.5.11", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[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 = "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.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[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 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror", -] - -[[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", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "risc0-binfmt" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" -dependencies = [ - "anyhow", - "borsh 1.5.3", - "elf", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "syn 2.0.87", - "tracing", -] - -[[package]] -name = "risc0-build" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc684382e24a8c91331040c33f1c789c755a5c1b0b8a32fefc1730ca36dd7072" -dependencies = [ - "anyhow", - "cargo_metadata", - "dirs", - "docker-generate", - "hex", - "risc0-binfmt", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "serde_json", - "tempfile", -] - -[[package]] -name = "risc0-core" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" -dependencies = [ - "bytemuck", - "rand_core 0.6.4", -] - -[[package]] -name = "risc0-zkp" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" -dependencies = [ - "anyhow", - "blake2", - "borsh 1.5.3", - "bytemuck", - "cfg-if", - "digest 0.10.7", - "hex", - "hex-literal", - "metal", - "paste", - "rand_core 0.6.4", - "risc0-core", - "risc0-zkvm-platform", - "serde", - "sha2 0.10.8", - "tracing", -] - -[[package]] -name = "risc0-zkvm-platform" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" -dependencies = [ - "stability", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[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 = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" -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.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "serde_json" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "solana-examples" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "methods", - "verifier_router", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.18.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0c52f25d28a1b5af57d5de3802e49883f68792a343101a9daf9817d8dfffff" -dependencies = [ - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "either", - "generic-array", - "im", - "lazy_static", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.18.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7d0abca44a21c83305e8650341f67ccc919a1a9dd698ddafc86e78b74b9296" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.87", -] - -[[package]] -name = "solana-program" -version = "1.18.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a99c3bc26fda40f42db98494271bda4906b0d7ab55f3ea7755fa5f110f58b5" -dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "base64 0.21.7", - "bincode", - "bitflags 2.6.0", - "blake3", - "borsh 0.10.4", - "borsh 0.9.3", - "borsh 1.5.3", - "bs58 0.4.0", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.15", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "light-poseidon", - "log", - "memoffset", - "num-bigint", - "num-derive", - "num-traits", - "parking_lot", - "rand 0.8.5", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.8", - "sha3", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", - "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.18.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2ac8d7ef471476164edb2ed105bcf26071835a15f0e74703929d4ec913676b" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.87", -] - -[[package]] -name = "stability" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" -dependencies = [ - "quote", - "syn 2.0.87", -] - -[[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.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac", - "once_cell", - "pbkdf2", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[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 = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[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-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[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-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "verifier_router" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "groth_16_verifier", - "ownable", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[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.87", - "wasm-bindgen-shared", -] - -[[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.87", - "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 = "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 = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[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.87", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -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.87", -] diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml index 7833a5b..48b5fd2 100644 --- a/solana-examples/hello-world/host/Cargo.toml +++ b/solana-examples/hello-world/host/Cargo.toml @@ -8,10 +8,12 @@ methods = { path = "../methods" } risc0-zkvm = { version = "1.1.3" } tracing-subscriber = { version = "0.3", features = ["env-filter"] } serde = "1.0" -# # solana-examples = { path = "../../programs/solana-examples"} -# # anchor-client = { version = "0.30.1" } +solana-examples = { path = "../../programs/solana-examples", features = ["no-entrypoint"] } +anchor-client = { version = "0.30.1" } serde_json = "1.0.133" +solana-program = "=1.18.20" + # Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 [patch.crates-io] -curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } +curve25519-dalek = { git = 'https://github.com/ivs/curve25519-dalek', branch='rustls-dep-hell' } \ No newline at end of file diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index 309b7b6..d57035e 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -8,27 +8,42 @@ declare_id!("HRA9VM1DJNhzuLhPG8k9Gb97PYocXJbRuNtZhnRmLiKC"); #[program] pub mod solana_examples { + use anchor_lang::solana_program::blake3::hashv; + use super::*; - pub fn initialize(ctx: Context, selector: u32) -> Result<()> { + /// This allows us to initialize our program by setting the selector of the Risc0 Router to use for + /// proofs, the image_id of our own example program, and by setting the default value for our internal + /// nonce. We may want to allow chanigng the selector so that we can use different verifiers in the future. + /// The image ID is tightly coupled with our guest program and prevents a user from changing the offchain + /// executable code and still getting a valid transaction. + pub fn initialize(ctx: Context, selector: u32, image_id: [u8; 32]) -> Result<()> { ctx.accounts.program_data.selector = selector; ctx.accounts.program_data.nonce = 0; + ctx.accounts.program_data.image_id = image_id; Ok(()) } + /// This is the main function of the on chain portion of our example program, + /// it takes a proof that someone has run our off chain program for the next nonce value. + /// If the input they gave the off chain program was for an earlier or later nonce, + /// the on chain program rejects the transaction. If it the proof is for incrementing to + /// the next nonce it accepts the transaciton. pub fn increment_nonce( - ctx: Context, + ctx: Context, proof: Proof, journal_nonce: u32, - imageId: [u8; 32], ) -> Result<()> { - // TODO: Verify that the proof comes from the correct Image ID + // Since our program only has a single output of a u32 value in the journal we can just accept what the data is + // and confirm it by creating a digest. Our first step is checking the conditions of the journal outputs match + // whatever our programs needs to accept the transaction. In this case we verify that the proof generated is + // of a nonce value one greater then the current one. require!( journal_nonce == ctx.accounts.program_data.nonce + 1, - ExampleErrors::BadProof + ExampleErrors::InvalidNonce ); - // TODO: Verify that the proof input is only one greater then the current nonce - // Create the CPI context for the router + + // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program let cpi_accounts = Verify { router: ctx.accounts.router.to_account_info(), verifier_entry: ctx.accounts.verifier_entry.to_account_info(), @@ -36,31 +51,37 @@ pub mod solana_examples { system_program: ctx.accounts.system_program.to_account_info(), }; - // TODO: Calculate Journal Digest from nonce on chain - let journal_digest: [u8; 32] = [0; 32]; + // We hash our journal outputs that we used for our earlier requirements to get a journal digest + let journal_digest = hashv(&[&journal_nonce.to_le_bytes()]).0; + + // We collect the image ID that our program is expecting our proof to match so that an attacker cannot use + // a proof generated from a modified program + let image_id = ctx.accounts.program_data.image_id; + // We pass the selector for the proof verifier that we are currently using + let selector = ctx.accounts.program_data.selector; + + // We setup our CPI context for the router let cpi_ctx = CpiContext::new(ctx.accounts.router.to_account_info(), cpi_accounts); - // Call verify through the router, which will then call the actual verifier - verifier_router::cpi::verify( - cpi_ctx, - proof, - ctx.accounts.program_data.selector, - imageId, - journal_digest, - )?; + // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid + // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although + // behaviour would be the same if I ignored the result. + verifier_router::cpi::verify(cpi_ctx, proof, selector, image_id, journal_digest).unwrap(); - // Increment the nonce + // If we reached this line it means that our proof was valid and we modify the program state as appropriate ctx.accounts.program_data.nonce += 1; Ok(()) } } +/// Data account used for storing our current nonce value, the immutable image_id and verifier selector values #[account] pub struct ProgramData { pub selector: u32, pub nonce: u32, + pub image_id: [u8; 32], } #[derive(Accounts)] @@ -68,10 +89,11 @@ pub struct Initialize<'info> { #[account( init, payer = authority, - space = 8 + 4 + 4 // discriminator + selector + nonce + space = 8 + 4 + 4 + 32 // discriminator + selector + nonce + image_id )] pub program_data: Account<'info, ProgramData>, + // Only used because we have to pay for rent for the account data #[account(mut)] pub authority: Signer<'info>, @@ -79,7 +101,7 @@ pub struct Initialize<'info> { } #[derive(Accounts)] -pub struct ProveRun<'info> { +pub struct IncrementNonce<'info> { #[account(mut)] pub program_data: Account<'info, ProgramData>, @@ -87,6 +109,7 @@ pub struct ProveRun<'info> { pub router: Program<'info, VerifierRouter>, // The PDA entry in the router that maps our selector to the actual verifier + // TODO: Try chanigng to unchecked account because verifier checks the fields #[account( seeds = [ b"verifier", @@ -99,8 +122,8 @@ pub struct ProveRun<'info> { pub verifier_entry: Account<'info, VerifierEntry>, // The actual Groth16 verifier program that will verify the proof - #[account(constraint = groth16_verifier.key() == verifier_entry.verifier @ ExampleErrors::InvalidVerifier)] - pub groth16_verifier: Program<'info, Groth16Verifier>, + // CHECK: The verifier program checks are handled by the router program + pub verifier_program: UncheckedAccount<'info>, pub system_program: Program<'info, System>, } @@ -109,6 +132,15 @@ pub struct ProveRun<'info> { pub enum ExampleErrors { #[msg("Invalid verifier selected")] InvalidVerifier, - #[msg("Bad Proof")] - BadProof, + #[msg("Nonce is invalid for current transaction")] + InvalidNonce, +} + +/// The event emitted when a user submits a valid transaction +/// showing who submitted the valid off chain proof and what +/// the new nonce value is for future runs +#[event] +pub struct SuccessfulIncrement { + by: Pubkey, + new_nonce: u32, } diff --git a/solana-verifier/.gitignore b/solana-verifier/.gitignore index 2e0446b..2f65bcb 100644 --- a/solana-verifier/.gitignore +++ b/solana-verifier/.gitignore @@ -5,3 +5,4 @@ target node_modules test-ledger .yarn +.env \ No newline at end of file diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml index f9321a5..d326806 100644 --- a/solana-verifier/Anchor.toml +++ b/solana-verifier/Anchor.toml @@ -5,9 +5,9 @@ resolution = true skip-lint = false [programs.localnet] -groth_16_verifier = "BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH" -test_bad_verifier = "Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP" -verifier_router = "2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK" +groth_16_verifier = "Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa" +test_bad_verifier = "AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r" +verifier_router = "DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa" [registry] url = "https://api.apr.dev" @@ -17,7 +17,8 @@ cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] -client = "yarn run ts-node scripts/codma.ts" +client = "yarn run ts-node -P ./tsconfig.json scripts/codma.ts" +deploy = "yarn run ts-node -P ./tsconfig.json scripts/deploy.ts" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [test] diff --git a/solana-verifier/package.json b/solana-verifier/package.json index 330ffc6..650159c 100644 --- a/solana-verifier/package.json +++ b/solana-verifier/package.json @@ -3,7 +3,8 @@ "scripts": { "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", - "client": "ts-node scripts/codma.ts" + "client": "ts-node -P ./tsconfig.json scripts/codma.ts", + "deploy": "ts-node -P ./tsconfig.json scripts/deploy.ts" }, "dependencies": { "@codama/nodes-from-anchor": "^1.0.1", @@ -15,7 +16,9 @@ "chai-as-promised": "^7.1.2", "codama": "^1.1.0", "deep-equal-in-any-order": "^2.0.6", - "solana-bankrun": "^0.4.0" + "dotenv": "^16.4.7", + "solana-bankrun": "^0.4.0", + "tslog": "^4.9.3" }, "devDependencies": { "@types/bn.js": "^5.1.0", diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index 230c0ef..31e7f09 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -13,7 +13,7 @@ pub use vk::{VerificationKey, VERIFICATION_KEY}; use error::*; -declare_id!("BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH"); +declare_id!("Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa"); const ALLOWED_CONTROL_ROOT: &str = "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs index 42a65f3..9d42577 100644 --- a/solana-verifier/programs/test_bad_verifier/src/lib.rs +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -2,7 +2,7 @@ use anchor_lang::prelude::*; use anchor_lang::system_program; use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; -declare_id!("Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP"); +declare_id!("AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r"); #[error_code] pub enum VerifierError { diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 45e66b8..1a26650 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -10,7 +10,7 @@ use estop::*; use router::*; use state::*; -declare_id!("2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK"); +declare_id!("DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa"); #[program] pub mod verifier_router { use ownable::OwnableError; diff --git a/solana-verifier/scripts/acceptOwnership.ts b/solana-verifier/scripts/acceptOwnership.ts new file mode 100644 index 0000000..68dfd60 --- /dev/null +++ b/solana-verifier/scripts/acceptOwnership.ts @@ -0,0 +1,24 @@ +import { Logger } from "tslog"; +import { + createRpc, + getNewOwnerAddress, + getRouterAddress, + getTransactionSigner, +} from "./utils/utils"; +import { acceptOwnership } from "./utils/ownership"; + +const logger = new Logger(); + +async function runAcceptOwnership() { + logger.info("Verifier Router Ownership Acceptance Script started"); + + const rpc = createRpc(); + const newOwner = await getTransactionSigner(); + const routerAddress = getRouterAddress(); + + await acceptOwnership(rpc.rpc, rpc.rpc_subscription, routerAddress, newOwner); + + logger.info("Verifier Router Ownership Acceptance Script Completed"); +} + +runAcceptOwnership().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/addVerifier.ts b/solana-verifier/scripts/addVerifier.ts new file mode 100644 index 0000000..06427b3 --- /dev/null +++ b/solana-verifier/scripts/addVerifier.ts @@ -0,0 +1,51 @@ +import { Logger } from "tslog"; +import { + createRpc, + changeAuthority, + getLocalKeypair, + getRouterAddress, + getTransactionSigner, + getVerifierAddress, + getRouterPda, +} from "./utils/utils"; +import { addVerifier } from "./utils/addVerifier"; + +const logger = new Logger(); +async function runAddVerifier() { + logger.info("Running script to add a new verifier to the Router"); + const verifierAddress = getVerifierAddress(); + const routerAddress = getRouterAddress(); + const deployer = await getLocalKeypair(); + const owner = await getTransactionSigner(); + + logger.info( + `Using Router: ${routerAddress}, adding verifier ${verifierAddress}` + ); + + const rpc = createRpc(); + + // TODO: Check who is the current authority and only call set authority if not currently set + logger.info("Changing Verifier Upgrade Authority to be the router program"); + + const routerPda = await getRouterPda(routerAddress); + await changeAuthority( + rpc.rpc, + rpc.rpc_subscription, + verifierAddress, + deployer, + routerPda.address + ); + + logger.info("Adding the verifier to the Router"); + await addVerifier( + rpc.rpc, + rpc.rpc_subscription, + verifierAddress, + routerAddress, + owner + ); + + logger.info("Verifier was successfully added to the router"); +} + +runAddVerifier().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts new file mode 100644 index 0000000..caece6e --- /dev/null +++ b/solana-verifier/scripts/deploy.ts @@ -0,0 +1,79 @@ +import { Logger } from "tslog"; +import { build_cli, deploy_cli } from "./utils/deploy"; +import { + changeAuthority, + createRpc, + getLocalKeypair, + getRouterPda, + getTransactionSigner, + Programs, + verifiable, +} from "./utils/utils"; +import { initilizeRouter } from "./utils/init"; +import { addVerifier } from "./utils/addVerifier"; + +const logger = new Logger(); + +async function run_deployment(): Promise { + logger.info("Risc0 Solana Program Deployment Script started"); + + const owner = await getTransactionSigner(); + const deployer = await getLocalKeypair(); + const verify = verifiable(); + const rpc = createRpc(); + + // Build and deploy the Solana programs on chain + logger.info("Attempting to sync keys and build programs for deployment"); + + if (verify) { + logger.warn("Build is not going to be verifiable"); + } + await build_cli(); + logger.info("Build of Solana programs was successful"); + + const router_address = await deploy_cli( + Programs.VerifierRouter, + verify, + false // Router should not be upgradable + ); + logger.info(`Verifier Router Program Address will be: ${router_address}`); + + const verifier_address = await deploy_cli( + Programs.Groth16Verifier, + verify, + // Verifier should be upgradable so that router can close it + // In the add verifier stage, router programs becomes upgrade + // authority + true + ); + logger.info(`Groth 16 Verifier Program Address will be: ${verifier_address}`); + + logger.info("Programs succesfully deployed"); + + // Initilize the Router by setting owner for the contract and creating the PDA + await initilizeRouter(rpc.rpc, rpc.rpc_subscription, router_address, owner); + + // Setup the Groth 16 Verifiers Upgrade authority to be the Router PDA + const routerPda = await getRouterPda(router_address); + const routerAddress = routerPda[0]; + await changeAuthority( + rpc.rpc, + rpc.rpc_subscription, + router_address, + deployer, + routerAddress + ); + + // Add the Groth 16 Verifier to the Router + await addVerifier( + rpc.rpc, + rpc.rpc_subscription, + verifier_address, + routerAddress, + owner + ); + + logger.info("Programs deployed and initilized"); +} + +run_deployment().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/estop.ts b/solana-verifier/scripts/estop.ts new file mode 100644 index 0000000..a734629 --- /dev/null +++ b/solana-verifier/scripts/estop.ts @@ -0,0 +1,60 @@ +import { + createRpc, + getRouterAddress, + getTransactionSigner, +} from "./utils/utils"; +import * as readline from "readline/promises"; +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +}); +import { Logger } from "tslog"; +import { estopByOwner } from "./utils/estop"; + +const logger = new Logger(); + +async function collectUserInput(): Promise { + console.log( + "Script to call Estop initated, answer the following questions to continue:" + ); + const input = Number(await rl.question("Enter Verifier selector (u32): ")); + const verify = Number( + await rl.question(`Reenter verifier selector to confirm: `) + ); + if (input !== verify) { + logger.error("Inputs did not match, Exiting."); + process.exit(1); + } + const confirm = await rl.question( + 'Type "YES CALL EMERGENCY STOP" to confirm: ' + ); + if (confirm !== "YES CALL EMERGENCY STOP") { + logger.error("User input did not match above confirmation, Exiting."); + process.exit(1); + } + rl.close(); + return input; +} + +async function run_estop() { + logger.info("Verifier Estop By Owner Script Started"); + logger.warn( + "CALLING E-STOP ON A VERIFIER IS IRREVERSABLE, MAKE SURE THIS IS WHAT YOU WANT TO DO" + ); + const rpc = createRpc(); + + const routerAddress = getRouterAddress(); + const owner = await getTransactionSigner(); + const selector = await collectUserInput(); + await estopByOwner( + rpc.rpc, + rpc.rpc_subscription, + routerAddress, + owner, + selector + ); + + logger.info("Estop by Owner script has completed"); +} + +run_estop().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/renounceOwnership copy.ts b/solana-verifier/scripts/renounceOwnership copy.ts new file mode 100644 index 0000000..9f9864a --- /dev/null +++ b/solana-verifier/scripts/renounceOwnership copy.ts @@ -0,0 +1,42 @@ +import { Logger } from "tslog"; +import { + createRpc, + getRouterAddress, + getTransactionSigner, +} from "./utils/utils"; +import { renounceOwnership } from "./utils/ownership"; +import * as readline from "readline/promises"; +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +}); + +const logger = new Logger(); + +async function ConfirmOperation() { + console.log( + "Script will Renounce Ownership, Verify intent by answering the prompt:" + ); + const confirm = await rl.question( + 'Type "YES CALL RENOUNCE OWNERSHIP" to confirm: ' + ); + if (confirm !== "YES CALL RENOUNCE OWNERSHIP") { + logger.error("User input did not match above confirmation, Exiting."); + process.exit(1); + } + rl.close(); +} + +async function runRenounceOwnership() { + logger.info("Verifier Router Renounce Ownership Script started"); + + const rpc = createRpc(); + const owner = await getTransactionSigner(); + const routerAddress = getRouterAddress(); + + await renounceOwnership(rpc.rpc, rpc.rpc_subscription, routerAddress, owner); + + logger.info("Verifier Router Renounce Ownership Script Completed"); +} + +runRenounceOwnership().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/transferOwnership.ts b/solana-verifier/scripts/transferOwnership.ts new file mode 100644 index 0000000..51cc2e5 --- /dev/null +++ b/solana-verifier/scripts/transferOwnership.ts @@ -0,0 +1,31 @@ +import { Logger } from "tslog"; +import { + createRpc, + getNewOwnerAddress, + getRouterAddress, + getTransactionSigner, +} from "./utils/utils"; +import { transferOwnership } from "./utils/ownership"; + +const logger = new Logger(); + +async function runTransferOwnership() { + logger.info("Verifier Router Ownership Transfer Script started"); + + const rpc = createRpc(); + const newOwner = getNewOwnerAddress(); + const owner = await getTransactionSigner(); + const routerAddress = getRouterAddress(); + + await transferOwnership( + rpc.rpc, + rpc.rpc_subscription, + routerAddress, + owner, + newOwner + ); + + logger.info("Verifier Router Ownership Transfer Script Completed"); +} + +runTransferOwnership().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/utils.ts b/solana-verifier/scripts/utils.ts deleted file mode 100644 index 4630821..0000000 --- a/solana-verifier/scripts/utils.ts +++ /dev/null @@ -1,99 +0,0 @@ -import fs from "fs"; -import path from "path"; -import os from "os"; - -import { - Rpc, - RpcSubscriptions, - SolanaRpcApi, - sendAndConfirmTransactionFactory, - setTransactionMessageFeePayerSigner, - appendTransactionMessageInstruction, - setTransactionMessageLifetimeUsingBlockhash, - signTransactionMessageWithSigners, - createTransactionMessage, - pipe, - SolanaRpcSubscriptionsApi, - Commitment, - BaseTransactionMessage, - TransactionPartialSigner, - createKeyPairSignerFromBytes, - KeyPairSigner, -} from "@solana/web3.js"; - -export interface SendTransactionParams< - TTransaction extends BaseTransactionMessage -> { - rpc: Rpc; - rpcSubscriptions: RpcSubscriptions; - feePayer: TransactionPartialSigner; - instruction: TTransaction["instructions"][number]; - commitment?: Commitment; -} - -export async function sendTransaction< - TTransaction extends BaseTransactionMessage ->({ - rpc, - rpcSubscriptions, - feePayer, - instruction: instruction, - commitment = "confirmed", -}: SendTransactionParams): Promise { - // Get the latest blockhash - const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); - - // Create the send and confirm transaction factory - const sendAndConfirmTransaction = sendAndConfirmTransactionFactory({ - rpc, - rpcSubscriptions, - }); - - // Create the transaction - const baseTransaction = createTransactionMessage({ - version: 0, - }) as TTransaction; - const transactionWithBlockhash = setTransactionMessageLifetimeUsingBlockhash( - latestBlockhash, - baseTransaction - ); - const transactionWithFeePayer = setTransactionMessageFeePayerSigner( - feePayer, - transactionWithBlockhash - ); - const finalTransaction = appendTransactionMessageInstruction( - instruction, - transactionWithFeePayer - ); - - // Sign the transaction - const signedTransaction = await signTransactionMessageWithSigners( - finalTransaction - ); - - // Send and confirm the transaction - await sendAndConfirmTransaction(signedTransaction, { commitment }); -} - -// Code taken from https://solana.com/developers/cookbook/development/load-keypair-from-file -export async function loadDefaultKeypair(): Promise> { - return await loadKeypairFromFile("~/.config/solana/id.json"); -} - -export async function loadKeypairFromFile( - filePath: string -): Promise> { - // This is here so you can also load the default keypair from the file system. - const resolvedPath = path.resolve( - filePath.startsWith("~") ? filePath.replace("~", os.homedir()) : filePath - ); - const loadedKeyBytes = Uint8Array.from( - JSON.parse(fs.readFileSync(resolvedPath, "utf8")) - ); - // Here you can also set the second parameter to true in case you need to extract your private key. - const keypairSigner = await createKeyPairSignerFromBytes( - loadedKeyBytes, - false - ); - return keypairSigner; -} diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts new file mode 100644 index 0000000..855ad04 --- /dev/null +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -0,0 +1,89 @@ +import { + Address, + getAddressCodec, + getProgramDerivedAddress, + Rpc, + RpcSubscriptions, + SolanaRpcApi, + SolanaRpcSubscriptionsApi, + TransactionSigner, +} from "@solana/web3.js"; +import { Logger } from "tslog"; +import { + getTransactionSigner, + createRpc, + sendTransaction, + getRouterPda, + getVerifierEntryPda, + getProgramDataAddress, +} from "./utils"; +import { + fetchVerifierEntry, + fetchVerifierRouter, + getAddVerifierInstruction, +} from "../verify-router"; +import { + getSetAuthorityInstruction, + SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +} from "../loaderV3"; + +const logger = new Logger(); + +export async function addVerifier( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + verifierAddress: Address, + routerAddress: Address, + owner: TransactionSigner +): Promise { + logger.info( + `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}` + ); + + logger.debug(`Using the address: ${owner.address} as owner`); + + const routerPDA = await getRouterPda(routerAddress); + + logger.debug( + `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}` + ); + + const routerData = await fetchVerifierRouter(rpc, routerPDA.address); + + logger.debug( + `Current verifier entry count is ${routerData.data.verifierCount}` + ); + + const selector = routerData.data.verifierCount + 1; + + logger.info( + `Using ${selector} as the selector for the verifier at address ${verifierAddress}` + ); + + const routerEntry = await getVerifierEntryPda(routerAddress, selector); + + const verifierProgramData = await getProgramDataAddress(verifierAddress); + + logger.info(`Attempting to send add verifier transaction`); + + const addVerifierInstruction = getAddVerifierInstruction( + { + authority: owner, + router: routerAddress, + selector, + verifierEntry: routerEntry.address, + verifierProgram: verifierAddress, + verifierProgramData: verifierProgramData.address, + }, + { programAddress: routerAddress } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: owner, + instruction: addVerifierInstruction, + }); + + logger.info("Add verifier transaction confirmed on chain"); +} diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts new file mode 100644 index 0000000..cf6f57a --- /dev/null +++ b/solana-verifier/scripts/utils/deploy.ts @@ -0,0 +1,75 @@ +import { promisify } from "util"; +import process from "child_process"; +import { Logger } from "tslog"; +import { + verifiable, + loadDefaultKeypair, + loadOwnerAddress, + Programs, + getLocalKeypair, + sendTransaction, + createRpc, + getTransactionSigner, +} from "./utils"; +import { + address, + Address, + createSolanaRpc, + createTransactionMessage, + getProgramDerivedAddress, +} from "@solana/web3.js"; +import { getInitializeInstruction } from "../verify-router"; +const exec = promisify(process.exec); + +export async function build_cli(): Promise { + // Sync Keys before building + await exec("anchor keys sync"); + // Build with verifiable outputs + const verify = verifiable(); + if (verify) { + await exec("anchor build --verifiable"); + } else { + await exec("anchor build"); + } +} + +interface DeploymentOutput { + programId: string; +} + +export async function deploy_cli( + program: Programs, + verify: boolean, + upgradable: boolean +): Promise> { + const command = [`anchor deploy --program-name ${program}`]; + + if (verify) { + command.push("--verify"); + } + + if (upgradable) { + command.push(""); + } + + command.push("-- output json"); + + if (!upgradable) { + command.push("--final"); + } + const rawOutput = (await exec(command.join(" "))).stdout; + + // Sometimes Anchor output prints things before and after the json data + // We want to extract the data in braces {} + const extractJsonObject = (input: string): DeploymentOutput => { + const match = input.match(/{[^]*}/); + if (!match) { + throw new Error("No JSON object found in output"); + } + return JSON.parse(match[0]) as DeploymentOutput; + }; + + const output = extractJsonObject(rawOutput); + + return address(output.programId); +} diff --git a/solana-verifier/scripts/utils/estop.ts b/solana-verifier/scripts/utils/estop.ts new file mode 100644 index 0000000..69128c2 --- /dev/null +++ b/solana-verifier/scripts/utils/estop.ts @@ -0,0 +1,80 @@ +import { + Address, + Rpc, + SolanaRpcApi, + RpcSubscriptions, + SolanaRpcSubscriptionsApi, + TransactionSigner, +} from "@solana/web3.js"; + +import { Logger } from "tslog"; +import { + getProgramDataAddress, + getRouterPda, + getVerifierEntryPda, + sendTransaction, + sleep, +} from "./utils"; +import { + fetchVerifierEntry, + getEmergencyStopInstruction, +} from "../verify-router"; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from "../loaderV3"; + +const logger = new Logger(); + +export async function estopByOwner( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + owner: TransactionSigner, + selector: number +): Promise { + logger.warn( + "EMERGENCY STOP HAS BEEN STARTED, THIS IS IRREVERSABLE...Program Will sleep for 5 seconds Kill program immediatly if not intentional, attempting to terminate a verifier!" + ); + logger.info( + `Emeregency Stop attempting to stop verifier with Selector: ${selector} on router ${routerAddress}` + ); + + await sleep(5000); // Sleep for 5 seconds in case this was an accident + + const routerPda = await getRouterPda(routerAddress); + + const verifierEntryPda = await getVerifierEntryPda(routerAddress, selector); + + const verifierEntry = await fetchVerifierEntry(rpc, verifierEntryPda.address); + + const verifierAddress = verifierEntry.data.verifier; + + const verifierProgramData = await getProgramDataAddress(verifierAddress); + + logger.info( + `Attempting to terminate verifier with address: ${verifierAddress}` + ); + + const estopInstruction = getEmergencyStopInstruction( + { + authority: owner, + bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + router: routerAddress, + selector, + verifierEntry: verifierEntryPda.address, + verifierProgram: verifierAddress, + verifierProgramData: verifierProgramData.address, + }, + { + programAddress: routerAddress, + } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: owner, + instruction: estopInstruction, + commitment: "confirmed", + }); + + logger.info("Estop by owner has been confirmed"); +} diff --git a/solana-verifier/scripts/utils/init.ts b/solana-verifier/scripts/utils/init.ts new file mode 100644 index 0000000..40d858a --- /dev/null +++ b/solana-verifier/scripts/utils/init.ts @@ -0,0 +1,68 @@ +import { promisify } from "util"; +import process from "child_process"; +import { Logger } from "tslog"; +import { + verifiable, + loadDefaultKeypair, + loadOwnerAddress, + Programs, + getLocalKeypair, + sendTransaction, + createRpc, + getTransactionSigner, + getRouterPda, +} from "./utils"; +import { + address, + Address, + createSolanaRpc, + createTransactionMessage, + getProgramDerivedAddress, + Rpc, + RpcSubscriptions, + SolanaRpcApi, + SolanaRpcSubscriptionsApi, + TransactionSigner, +} from "@solana/web3.js"; +import { getInitializeInstruction } from "../verify-router"; + +export async function initilizeRouter( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + owner: TransactionSigner +): Promise { + const log = new Logger(); + + log.info( + `Initilizing the Verifier Router at address: ${routerAddress} with owner: ${owner.address}` + ); + // Configrue the Verifier Router program + const routerPDA = await getRouterPda(routerAddress); + + log.debug( + `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}` + ); + + const initInstruction = getInitializeInstruction( + { + authority: owner, + router: routerPDA.address, + }, + { programAddress: routerAddress } + ); + + log.info( + "Attempting to submit the Verifier Router Initilization Instruction" + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: owner, + instruction: initInstruction, + commitment: "confirmed", + }); + + log.info(`Router at address: ${routerAddress} has been initialized`); +} diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts new file mode 100644 index 0000000..e304e09 --- /dev/null +++ b/solana-verifier/scripts/utils/ownership.ts @@ -0,0 +1,175 @@ +import { + Rpc, + SolanaRpcApi, + RpcSubscriptions, + SolanaRpcSubscriptionsApi, + Address, + TransactionSigner, +} from "@solana/web3.js"; +import { Logger } from "tslog"; +import { + fetchVerifierRouter, + getAcceptOwnershipInstruction, + getCancelTransferInstruction, + getRenounceOwnershipInstruction, + getTransferOwnershipInstruction, +} from "../verify-router"; +import { getRouterPda, sendTransaction, sleep } from "./utils"; + +const logger = new Logger(); + +export async function transferOwnership( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + owner: TransactionSigner, + newOwner: Address +) { + logger.info( + `Transfering ownership from ${owner} to new owner: ${newOwner} for router ${routerAddress}` + ); + + const routerPda = await getRouterPda(routerAddress); + logger.debug( + `Using Router PDA Address: ${routerPda.address} with bump: ${routerPda.bump}` + ); + + const transferOwnershipInstruction = getTransferOwnershipInstruction( + { + authority: owner, + newOwner: newOwner, + state: routerPda.address, + }, + { + programAddress: routerAddress, + } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: owner, + instruction: transferOwnershipInstruction, + }); + + logger.info( + "Ownership transfer transaction confirmed, have the new owner accept the role" + ); +} + +export async function acceptOwnership( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + newOwner: TransactionSigner +) { + logger.info(`Accepting ownership of router ${routerAddress}`); + + const routerPda = await getRouterPda(routerAddress); + logger.debug( + `Using Router PDA Address: ${routerPda.address} with bump: ${routerPda.bump}` + ); + + const acceptOwnershipTransferInstruction = getAcceptOwnershipInstruction( + { + authority: newOwner, + state: routerPda.address, + }, + { + programAddress: routerAddress, + } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: newOwner, + instruction: acceptOwnershipTransferInstruction, + }); + + logger.info( + `Ownership transfer completed, ${newOwner.address} now has the ownership role` + ); +} + +export async function cancelTransfer( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + authority: TransactionSigner +) { + logger.info(`Canceling the ownership transfer on router ${routerAddress}`); + + const routerPda = await getRouterPda(routerAddress); + logger.debug( + `Using Router PDA Address: ${routerPda.address} with bump: ${routerPda.bump}` + ); + + const routerData = await fetchVerifierRouter(rpc, routerPda.address); + + const cancelOwnershipTransferInstruction = getCancelTransferInstruction( + { + authority, + state: routerPda.address, + }, + { + programAddress: routerAddress, + } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: authority, + instruction: cancelOwnershipTransferInstruction, + }); + + logger.info( + `Ownership transfer cancelation transaction confirmed. ${routerData.data.ownership.pendingOwner} may no longer accept ownership of the transfer.` + ); +} + +export async function renounceOwnership( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + routerAddress: Address, + owner: TransactionSigner +) { + logger.warn("RENOUNCE OWNERSHIP HAS BEEN CALLED, THIS IS IRREVERSABLE..."); + logger.warn( + "Was renounced no new verifier may be added to the router, and Emergency Stop can only be called by producing a verifiably bad proof." + ); + logger.warn( + "Program will sleep for 5 seconds. Kill program if you wish to stop NOW." + ); + + await sleep(5000); + + logger.info(`Renouncing ownership of router at address ${routerAddress}`); + + const routerPda = await getRouterPda(routerAddress); + logger.debug( + `Using Router PDA Address: ${routerPda.address} with bump: ${routerPda.bump}` + ); + + const renounceOwnershipInstruction = getRenounceOwnershipInstruction( + { + authority: owner, + state: routerPda.address, + }, + { + programAddress: routerAddress, + } + ); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: owner, + instruction: renounceOwnershipInstruction, + }); + + logger.info( + "Ownership has been renounced, no new verifier may be added to the router." + ); +} diff --git a/solana-verifier/scripts/utils/test.ts b/solana-verifier/scripts/utils/test.ts new file mode 100644 index 0000000..e69de29 diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts new file mode 100644 index 0000000..55780a8 --- /dev/null +++ b/solana-verifier/scripts/utils/utils.ts @@ -0,0 +1,329 @@ +import fs from "fs"; +import path from "path"; +import os from "os"; +import dotenv from "dotenv"; +import { Logger } from "tslog"; + +import { + Rpc, + RpcSubscriptions, + SolanaRpcApi, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + appendTransactionMessageInstruction, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, + createTransactionMessage, + pipe, + SolanaRpcSubscriptionsApi, + Commitment, + BaseTransactionMessage, + TransactionPartialSigner, + createKeyPairSignerFromBytes, + KeyPairSigner, + Address, + address, + createSolanaRpcApi, + RpcFromTransport, + RpcTransport, + SolanaRpcApiFromTransport, + RpcSubscriptionsFromTransport, + RpcSubscriptionsTransport, + createSolanaRpc, + createSolanaRpcSubscriptions, + TransactionSigner, + getAddressCodec, + getProgramDerivedAddress, + ProgramDerivedAddressBump, + getU32Codec, +} from "@solana/web3.js"; +import { + getSetAuthorityInstruction, + SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, +} from "../loaderV3"; +import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from "../verify-router"; +import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../groth16"; + +dotenv.config(); +const logger = new Logger(); + +export enum Programs { + VerifierRouter = "verifier_router", + Groth16Verifier = "groth_16_verifier", + TestBadVerifier = "test_bad_verifier", +} + +export interface SendTransactionParams< + TTransaction extends BaseTransactionMessage +> { + rpc: Rpc; + rpcSubscriptions: RpcSubscriptions; + feePayer: TransactionPartialSigner | TransactionSigner; + instruction: TTransaction["instructions"][number]; + commitment?: Commitment; +} + +export async function sendTransaction< + TTransaction extends BaseTransactionMessage +>({ + rpc, + rpcSubscriptions, + feePayer, + instruction: instruction, + commitment = "confirmed", +}: SendTransactionParams): Promise { + // Get the latest blockhash + const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); + + // Create the send and confirm transaction factory + const sendAndConfirmTransaction = sendAndConfirmTransactionFactory({ + rpc, + rpcSubscriptions, + }); + + // Create the transaction + const baseTransaction = createTransactionMessage({ + version: 0, + }) as TTransaction; + const transactionWithBlockhash = setTransactionMessageLifetimeUsingBlockhash( + latestBlockhash, + baseTransaction + ); + const transactionWithFeePayer = setTransactionMessageFeePayerSigner( + feePayer, + transactionWithBlockhash + ); + const finalTransaction = appendTransactionMessageInstruction( + instruction, + transactionWithFeePayer + ); + + // Sign the transaction + const signedTransaction = await signTransactionMessageWithSigners( + finalTransaction + ); + + // Send and confirm the transaction + await sendAndConfirmTransaction(signedTransaction, { commitment }); +} + +// TODO: Optional Extra bit +// // Of course the IDL generated for the LoaderV3 wolud not have any state data +// // to parse ProgramData accounts, lets do it manually... +// export async function getProgramData(rpc: Rpc, rpcSubscriptions: RpcSubscriptions, programDataAddress: Address) { +// getAccount +// } + +// export async function getAuthority( +// rpc: Rpc, +// rpcSubscriptions: RpcSubscriptions, +// programAddress: Address +// ): Promise> { +// logger.trace( +// `Fetching the current authority for the program at address: ${programAddress}` +// ); +// const programDataAddress = await getProgramDataAddress(programAddress); + +// logger.trace( +// `Using ${programDataAddress} as the address for authority lookup` +// ); + +// } + +export async function sleep(ms: number): Promise { + return new Promise((res) => setTimeout(res, ms)); +} + +export async function changeAuthority( + rpc: Rpc, + rpcSubscriptions: RpcSubscriptions, + programAddress: Address, + currentAuthority: TransactionSigner, + newAuthority: Address +): Promise { + logger.info( + `Attempting to set the Upgrade Authority of ${programAddress} to ${newAuthority}` + ); + const programData = await getProgramDataAddress(programAddress); + logger.debug( + `Program: ${programAddress} has ProgramData Account Address of ${programData.address} with Bump: ${programData.bump}` + ); + const setAuthorityInstruction = getSetAuthorityInstruction({ + currentAuthority, + newAuthority, + bufferOrProgramDataAccount: programData.address, + }); + + logger.info("Attempting to submit the Upgrade Authority Transaction"); + + await sendTransaction({ + rpc, + rpcSubscriptions, + feePayer: currentAuthority, + instruction: setAuthorityInstruction, + commitment: "confirmed", + }); + + logger.info("Transaction confirmed, upgrade authority changed"); +} + +// Code taken from https://solana.com/developers/cookbook/development/load-keypair-from-file +export async function loadDefaultKeypair(): Promise> { + return await loadKeypairFromFile("~/.config/solana/id.json"); +} + +export async function loadKeypairFromFile( + filePath: string +): Promise> { + // This is here so you can also load the default keypair from the file system. + const resolvedPath = path.resolve( + filePath.startsWith("~") ? filePath.replace("~", os.homedir()) : filePath + ); + const loadedKeyBytes = Uint8Array.from( + JSON.parse(fs.readFileSync(resolvedPath, "utf8")) + ); + // Here you can also set the second parameter to true in case you need to extract your private key. + const keypairSigner = await createKeyPairSignerFromBytes( + loadedKeyBytes, + false + ); + return keypairSigner; +} +interface PDA { + address: Address; + bump: ProgramDerivedAddressBump; +} + +export async function getRouterPda( + routerAddress: Address +): Promise { + const pda = await getProgramDerivedAddress({ + programAddress: routerAddress, + seeds: ["router"], + }); + return { + address: pda[0], + bump: pda[1], + }; +} + +export async function getVerifierEntryPda( + routerAddress: Address, + selector: number +): Promise { + const routerSeedAddress = getAddressCodec().encode(routerAddress); + const selectorSeed = getU32Codec().encode(selector); + const pda = await getProgramDerivedAddress({ + programAddress: routerAddress, + seeds: ["verifier", routerSeedAddress, selectorSeed], + }); + return { + address: pda[0], + bump: pda[1], + }; +} + +export async function getProgramDataAddress( + programAddress: Address +): Promise { + const programAddressSeed = getAddressCodec().encode(programAddress); + const pda = await getProgramDerivedAddress({ + programAddress: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, + seeds: [programAddressSeed], + }); + return { + address: pda[0], + bump: pda[1], + }; +} + +export async function getLocalKeypair(): Promise> { + const keyfile = process.env.KEY_PAIR_FILE; + if (keyfile) { + return loadKeypairFromFile(keyfile); + } + return loadDefaultKeypair(); +} + +export async function getTransactionSigner(): Promise { + const keys = await getLocalKeypair(); + return keys; +} + +export function getRouterAddress(): Address { + const router_env = process.env.ROUTER_ADDRESS; + if (router_env) { + return address(router_env); + } + logger.debug( + `ROUTER_ADDRESS not set, using address: ${VERIFIER_ROUTER_PROGRAM_ADDRESS}` + ); + return VERIFIER_ROUTER_PROGRAM_ADDRESS; +} + +export function getVerifierAddress(): Address { + const verifier_env = process.env.VERIFIER_ADDRESS; + if (verifier_env) { + return address(verifier_env); + } + logger.debug( + `VERIFIER_ADDRESS not set, using Groth16 Address: ${GROTH16_VERIFIER_PROGRAM_ADDRESS}` + ); + return GROTH16_VERIFIER_PROGRAM_ADDRESS; +} + +export function getNewOwnerAddress(): Address { + const newOwner_env = process.env.NEW_OWNER; + if (!newOwner_env) { + logger.fatal( + "NEW_OWNER address is not defined and script required this variable to continue" + ); + } + return address(newOwner_env); +} + +export async function loadOwnerAddress(): Promise> { + const owner = process.env.ROUTER_OWNER; + if (owner) { + return address(owner); + } + logger.debug(`Owner variable not set, using local keypair`); + const keypair = await getLocalKeypair(); + return keypair.address; +} + +export function verifiable(): boolean { + const verifiable_env = process.env.VERIFIABLE; + if (verifiable_env === undefined) { + logger.debug("Verifiable builds not set, defaulting to true."); + return true; + } + const verifiable = parseBoolean(verifiable_env); + logger.debug(`Verifiable Builds: ${verifiable}`); + return verifiable; +} + +interface SolanaRpcInformation { + rpc: RpcFromTransport, RpcTransport>; + rpc_subscription: RpcSubscriptionsFromTransport< + SolanaRpcSubscriptionsApi, + RpcSubscriptionsTransport + >; +} + +function parseBoolean(value: string): boolean { + if (!value) { + return false; + } + return ["true", "on", "yes"].includes(value.toLowerCase()); +} + +export function createRpc(): SolanaRpcInformation { + const rpcAddress = process.env.RPC || "http://localhost:8899"; + const subscriptionAddress = + process.env.RPC_SUBSCRIPTION || "ws://localhost:8900"; + return { + rpc: createSolanaRpc(rpcAddress), + rpc_subscription: createSolanaRpcSubscriptions(subscriptionAddress), + }; +} diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index 02c5402..6a598b5 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -1027,6 +1027,11 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" +dotenv@^16.4.7: + version "16.4.7" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -1804,6 +1809,11 @@ tslib@^2.0.3, tslib@^2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz" integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== +tslog@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.9.3.tgz#d4167d5f51748bdeab593945bc2d8f9827ea0dba" + integrity sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw== + type-detect@^4.0.0, type-detect@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" From 943cc29b1e7ba3860739fb13af560a16a10780d2 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sun, 15 Dec 2024 22:52:39 -0700 Subject: [PATCH 03/21] Fixed bugs in scripts --- solana-verifier/scripts/deploy.ts | 15 +++++++-------- ...unceOwnership copy.ts => renounceOwnership.ts} | 2 ++ solana-verifier/scripts/utils/addVerifier.ts | 2 +- solana-verifier/scripts/utils/deploy.ts | 2 +- solana-verifier/scripts/utils/estop.ts | 2 +- solana-verifier/scripts/utils/ownership.ts | 2 +- solana-verifier/scripts/utils/utils.ts | 3 ++- 7 files changed, 15 insertions(+), 13 deletions(-) rename solana-verifier/scripts/{renounceOwnership copy.ts => renounceOwnership.ts} (97%) diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index caece6e..53a0983 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -25,18 +25,18 @@ async function run_deployment(): Promise { // Build and deploy the Solana programs on chain logger.info("Attempting to sync keys and build programs for deployment"); - if (verify) { + if (!verify) { logger.warn("Build is not going to be verifiable"); } await build_cli(); logger.info("Build of Solana programs was successful"); - const router_address = await deploy_cli( + const routerAddress = await deploy_cli( Programs.VerifierRouter, verify, false // Router should not be upgradable ); - logger.info(`Verifier Router Program Address will be: ${router_address}`); + logger.info(`Verifier Router Program Address will be: ${routerAddress}`); const verifier_address = await deploy_cli( Programs.Groth16Verifier, @@ -51,17 +51,16 @@ async function run_deployment(): Promise { logger.info("Programs succesfully deployed"); // Initilize the Router by setting owner for the contract and creating the PDA - await initilizeRouter(rpc.rpc, rpc.rpc_subscription, router_address, owner); + await initilizeRouter(rpc.rpc, rpc.rpc_subscription, routerAddress, owner); // Setup the Groth 16 Verifiers Upgrade authority to be the Router PDA - const routerPda = await getRouterPda(router_address); - const routerAddress = routerPda[0]; + const routerPda = await getRouterPda(routerAddress); await changeAuthority( rpc.rpc, rpc.rpc_subscription, - router_address, + verifier_address, deployer, - routerAddress + routerPda.address ); // Add the Groth 16 Verifier to the Router diff --git a/solana-verifier/scripts/renounceOwnership copy.ts b/solana-verifier/scripts/renounceOwnership.ts similarity index 97% rename from solana-verifier/scripts/renounceOwnership copy.ts rename to solana-verifier/scripts/renounceOwnership.ts index 9f9864a..91ef465 100644 --- a/solana-verifier/scripts/renounceOwnership copy.ts +++ b/solana-verifier/scripts/renounceOwnership.ts @@ -34,6 +34,8 @@ async function runRenounceOwnership() { const owner = await getTransactionSigner(); const routerAddress = getRouterAddress(); + await ConfirmOperation(); + await renounceOwnership(rpc.rpc, rpc.rpc_subscription, routerAddress, owner); logger.info("Verifier Router Renounce Ownership Script Completed"); diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts index 855ad04..9bb9709 100644 --- a/solana-verifier/scripts/utils/addVerifier.ts +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -69,7 +69,7 @@ export async function addVerifier( const addVerifierInstruction = getAddVerifierInstruction( { authority: owner, - router: routerAddress, + router: routerPDA.address, selector, verifierEntry: routerEntry.address, verifierProgram: verifierAddress, diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts index cf6f57a..023daf7 100644 --- a/solana-verifier/scripts/utils/deploy.ts +++ b/solana-verifier/scripts/utils/deploy.ts @@ -52,7 +52,7 @@ export async function deploy_cli( command.push(""); } - command.push("-- output json"); + command.push("-- --output json"); if (!upgradable) { command.push("--final"); diff --git a/solana-verifier/scripts/utils/estop.ts b/solana-verifier/scripts/utils/estop.ts index 69128c2..010c972 100644 --- a/solana-verifier/scripts/utils/estop.ts +++ b/solana-verifier/scripts/utils/estop.ts @@ -57,7 +57,7 @@ export async function estopByOwner( { authority: owner, bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, - router: routerAddress, + router: routerPda.address, selector, verifierEntry: verifierEntryPda.address, verifierProgram: verifierAddress, diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts index e304e09..c9dc291 100644 --- a/solana-verifier/scripts/utils/ownership.ts +++ b/solana-verifier/scripts/utils/ownership.ts @@ -137,7 +137,7 @@ export async function renounceOwnership( ) { logger.warn("RENOUNCE OWNERSHIP HAS BEEN CALLED, THIS IS IRREVERSABLE..."); logger.warn( - "Was renounced no new verifier may be added to the router, and Emergency Stop can only be called by producing a verifiably bad proof." + "Once renounced no new verifier may be added to the router, and Emergency Stop can only be called by producing a verifiably bad proof." ); logger.warn( "Program will sleep for 5 seconds. Kill program if you wish to stop NOW." diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 55780a8..54052c8 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -211,7 +211,8 @@ export async function getVerifierEntryPda( routerAddress: Address, selector: number ): Promise { - const routerSeedAddress = getAddressCodec().encode(routerAddress); + const routerPda = await getRouterPda(routerAddress); + const routerSeedAddress = getAddressCodec().encode(routerPda.address); const selectorSeed = getU32Codec().encode(selector); const pda = await getProgramDerivedAddress({ programAddress: routerAddress, From c709a16f58d2c528ad8c3e5c900a0f58138ff5dc Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Wed, 18 Dec 2024 06:34:14 -0700 Subject: [PATCH 04/21] Updated the deployment scripts. Refactored the Router to not require as much work to calculate PDA's. Finished E2E test. Currently still needs a transactionSigner for fireblocks, updated comments, and GROTH16 is not verifier is not passing our example program, I must test if my conversion to anchor caused this. --- solana-examples/Anchor.toml | 2 +- solana-examples/Cargo.lock | 2958 +++++++++++++++++ solana-examples/hello-world/host/Cargo.toml | 13 +- solana-examples/hello-world/host/src/main.rs | 245 +- .../hello-world/methods/guest/Cargo.toml | 2 +- solana-examples/package.json | 17 +- .../programs/solana-examples/src/lib.rs | 24 +- solana-examples/yarn.lock | 697 ++++ solana-utils/Cargo.lock | 7 + solana-utils/Cargo.toml | 6 + solana-utils/src/lib.rs | 37 + solana-verifier/Anchor.toml | 2 +- solana-verifier/Cargo.lock | 558 +++- solana-verifier/package.json | 1 + .../programs/groth_16_verifier/Cargo.toml | 7 +- .../programs/groth_16_verifier/src/lib.rs | 43 + .../programs/verifier_router/src/estop/mod.rs | 2 - .../programs/verifier_router/src/lib.rs | 2 +- .../verifier_router/src/router/mod.rs | 14 +- .../programs/verifier_router/src/state/mod.rs | 2 - .../bad-verifier/programs/testBadVerifier.ts | 4 +- solana-verifier/scripts/deploy.ts | 5 +- .../groth16/programs/groth16Verifier.ts | 4 +- solana-verifier/scripts/utils/deploy.ts | 5 + .../scripts/utils/fireblocksSigner.ts | 2 + solana-verifier/scripts/utils/test.ts | 0 solana-verifier/scripts/utils/utils.ts | 7 +- .../verify-router/accounts/verifierEntry.ts | 11 +- .../verify-router/errors/verifierRouter.ts | 32 +- .../verify-router/instructions/addVerifier.ts | 1 - .../instructions/emergencyStop.ts | 1 - .../instructions/emergencyStopWithProof.ts | 1 - .../verify-router/instructions/verify.ts | 21 +- .../verify-router/programs/verifierRouter.ts | 4 +- .../{new-tests.ts => router-verifier.ts} | 141 +- solana-verifier/yarn.lock | 577 +++- 36 files changed, 5221 insertions(+), 234 deletions(-) create mode 100644 solana-examples/Cargo.lock create mode 100644 solana-utils/Cargo.lock create mode 100644 solana-utils/Cargo.toml create mode 100644 solana-utils/src/lib.rs create mode 100644 solana-verifier/scripts/utils/fireblocksSigner.ts delete mode 100644 solana-verifier/scripts/utils/test.ts rename solana-verifier/tests/{new-tests.ts => router-verifier.ts} (82%) diff --git a/solana-examples/Anchor.toml b/solana-examples/Anchor.toml index 8cc43f9..2fc74c1 100644 --- a/solana-examples/Anchor.toml +++ b/solana-examples/Anchor.toml @@ -5,7 +5,7 @@ resolution = true skip-lint = false [programs.localnet] -solana_examples = "HRA9VM1DJNhzuLhPG8k9Gb97PYocXJbRuNtZhnRmLiKC" +solana_examples = "C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo" [registry] url = "https://api.apr.dev" diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock new file mode 100644 index 0000000..6a916af --- /dev/null +++ b/solana-examples/Cargo.lock @@ -0,0 +1,2958 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "getrandom 0.2.15", + "solana-program 1.18.20", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake3" +version = "1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[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 = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" +dependencies = [ + "borsh-derive 1.5.3", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + +[[package]] +name = "cc" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +dependencies = [ + "jobserver", + "libc", + "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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[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 = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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 = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[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 0.10.7", + "fiat-crypto", + "rand_core 0.6.4", + "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.90", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "docker-generate" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf673e0848ef09fa4aeeba78e681cf651c0c7d35f76ee38cec8e55bc32fa111" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elf" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "five8_const" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b4f62f0f8ca357f93ae90c8c2dd1041a1f665fde2f889ea9b1787903829015" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94474d15a76982be62ca8a39570dccce148d98c238ebb7408b0a21b2c4bdddc4" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "groth_16_verifier" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anyhow", + "ark-bn254", + "ark-serialize", + "borsh 1.5.3", + "hex", + "num-bigint", + "num-traits", + "risc0-zkp", + "serde", + "solana-program 2.1.6", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[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 = "libc" +version = "0.2.168" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[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 = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "methods" +version = "0.1.0" +dependencies = [ + "risc0-build", +] + +[[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", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[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 = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ownable" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "ownable-macro", +] + +[[package]] +name = "ownable-macro" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[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 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[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 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror", +] + +[[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", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "risc0-binfmt" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901fb75d62d70320adc7adae2abad354a3b7565603115dfb3134465227846475" +dependencies = [ + "anyhow", + "borsh 1.5.3", + "elf", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "tracing", +] + +[[package]] +name = "risc0-build" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99fb40aeeaf59dddd6b6c3a177c95e8b3c7f0fb6de7d25a0687d12398323292" +dependencies = [ + "anyhow", + "cargo_metadata", + "dirs", + "docker-generate", + "hex", + "risc0-binfmt", + "risc0-zkp", + "risc0-zkvm-platform", + "serde", + "serde_json", + "tempfile", +] + +[[package]] +name = "risc0-core" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733491635d50b742d1f30a923aa3b83d62f35cef724bbf402dfc02e6f10f587a" +dependencies = [ + "bytemuck", + "rand_core 0.6.4", +] + +[[package]] +name = "risc0-zkp" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21eadc5099bf0d8ecaed718810dc5deaf237ae39a2fcb66e542e8f9660132617" +dependencies = [ + "anyhow", + "blake2", + "borsh 1.5.3", + "bytemuck", + "cfg-if", + "digest 0.10.7", + "hex", + "hex-literal", + "metal", + "paste", + "rand_core 0.6.4", + "risc0-core", + "risc0-zkvm-platform", + "serde", + "sha2 0.10.8", + "tracing", +] + +[[package]] +name = "risc0-zkvm-platform" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26bbcc486222a0086d36244ae1f388cac1318270bca2dd23d77af2005d679edf" +dependencies = [ + "stability", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[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 = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +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.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "serde_json" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-account-info" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42051fa2def3a2d9123f0e33b62a983b25c13d153a30e707b14d3c3b79a91592" +dependencies = [ + "bincode", + "serde", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", +] + +[[package]] +name = "solana-atomic-u64" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10dad9cf8527bbf74d3668505f563bd362e2e14d0fc77338d20973e881bbad0b" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-bincode" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3b178d3783809a2480c542cd7c57c06e1bab2c0f21562fcb8cd13eabd0138e" +dependencies = [ + "bincode", + "serde", + "solana-instruction", +] + +[[package]] +name = "solana-borsh" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870197ea4929500d8e6f624c3eb578912b5063bbd5c8bfbe87396cd5b4257465" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.3", +] + +[[package]] +name = "solana-clock" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b26a68f89972fddb370ba33a49340bd3419da529893d9ee851211588aee811fa" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cpi" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3b62e1ca838f92b90c25ab68c297272cee8e2256dad18806a219b05cfcd247" +dependencies = [ + "solana-account-info", + "solana-define-syscall", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-stable-layout", +] + +[[package]] +name = "solana-decode-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1323dbdb7c8ca717bcd7987a3f45619b5b6517dc3ee22a21342122a5516125c3" +dependencies = [ + "num-traits", +] + +[[package]] +name = "solana-define-syscall" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23cf0144176f94019a27ce46372661f67007232eea16cae96cb985fc25131d5" + +[[package]] +name = "solana-epoch-schedule" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60dde3613fcd1af91c2033e67ffe8c8d2bcd58085c53c842fa7903fa839ad38" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-examples" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "methods", + "verifier_router", +] + +[[package]] +name = "solana-fee-calculator" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c706f3d151d0abc197ca2fcecf877ace03d613be6fae766de12f5fb41c96b04" +dependencies = [ + "log", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0c52f25d28a1b5af57d5de3802e49883f68792a343101a9daf9817d8dfffff" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7d0abca44a21c83305e8650341f67ccc919a1a9dd698ddafc86e78b74b9296" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.90", +] + +[[package]] +name = "solana-hash" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a86aabbd7ebf807689a0355f053d6dc31d2131c2d83613011a374a18cc5d61b7" +dependencies = [ + "borsh 1.5.3", + "bs58 0.5.1", + "bytemuck", + "bytemuck_derive", + "js-sys", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", + "wasm-bindgen", +] + +[[package]] +name = "solana-instruction" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ed5710c998efd09ffb596cf5e7266c11cd56e3a136c8a1f940e8525fd5be6e" +dependencies = [ + "bincode", + "borsh 1.5.3", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-define-syscall", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-last-restart-slot" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5647af0980c796c942e33f1f7dbffca29b7747630b720e6975abb1d7c531f6" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-msg" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d6a46fcbbaa38193b5b6aeec531395da8dac8dcd183ac6d80d94e6513fc4ad8" +dependencies = [ + "solana-define-syscall", +] + +[[package]] +name = "solana-native-token" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa3c5006bbea99b810ad8fc6ae168fc83891b607a13a9aa6be39db71a700f87" + +[[package]] +name = "solana-program" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a99c3bc26fda40f42db98494271bda4906b0d7ab55f3ea7755fa5f110f58b5" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek 3.2.1", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro 1.18.20", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afc847b91b77c48113a55f7f492cc7e982e1778c6b954a05feb499f9b8c3cc4" +dependencies = [ + "base64 0.22.1", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 1.5.3", + "bs58 0.5.1", + "bv", + "bytemuck", + "bytemuck_derive", + "console_error_panic_hook", + "console_log", + "curve25519-dalek 4.1.3", + "five8_const", + "getrandom 0.2.15", + "js-sys", + "lazy_static", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "sha3", + "solana-account-info", + "solana-atomic-u64", + "solana-bincode", + "solana-borsh", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-define-syscall", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-last-restart-slot", + "solana-msg", + "solana-native-token", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sanitize", + "solana-sdk-macro 2.1.6", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "solana-short-vec", + "solana-slot-hashes", + "solana-slot-history", + "solana-stable-layout", + "solana-sysvar-id", + "solana-transaction-error", + "thiserror", + "wasm-bindgen", +] + +[[package]] +name = "solana-program-entrypoint" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "988a49fb8231e95861d11b40931f49e06f0dea5a29241acf7cbca644c52abd6b" +dependencies = [ + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", +] + +[[package]] +name = "solana-program-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2473773ee9cebf6ba3d7d1fe911938bc2a3a694e85bea33fd7a99d397cde1202" +dependencies = [ + "borsh 1.5.3", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", +] + +[[package]] +name = "solana-program-memory" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d9e6ca90bbc3020b7b37091c05049f5de48e397545093ec303dc6eff3d4720c" +dependencies = [ + "num-traits", + "solana-define-syscall", +] + +[[package]] +name = "solana-program-option" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2334c5f9adcc25c6390fbf87ac127adbfbd8943465726e5f389159677ceba2" + +[[package]] +name = "solana-program-pack" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305475eef9404539cce0c561ab9997b875cc5509f7c553859cd059fdf93b0ab2" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-pubkey" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a954fba3af498201179981818b0ed61f95c32b4a3db5ea9cc042c971c84cdeae" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.3", + "bs58 0.5.1", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", + "five8_const", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-decode-error", + "solana-define-syscall", + "solana-sanitize", + "solana-sha256-hasher", + "wasm-bindgen", +] + +[[package]] +name = "solana-rent" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebcc59bff8b3c773214545d038b718a3e2e63c920b8172f85725463029f7f00" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sanitize" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05ecd7ec442abf0561cbf06984484d6368e71a4882213bfa68b658b0f8d6a0e" + +[[package]] +name = "solana-sdk-macro" +version = "1.18.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2ac8d7ef471476164edb2ed105bcf26071835a15f0e74703929d4ec913676b" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.90", +] + +[[package]] +name = "solana-sdk-macro" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85df4723291cfec8ffe9dadc59d565afcae12ea9a6460b7b28c4da21c2c4a887" +dependencies = [ + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "solana-secp256k1-recover" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c38fc7bc33f78af99c4848c9a924b2b6e5d33d96f269d108777d982de72f73" +dependencies = [ + "libsecp256k1", + "solana-define-syscall", + "thiserror", +] + +[[package]] +name = "solana-serde-varint" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2fc696c10a2b02356584cbd45d83d42b01b10256cb36b5d0c3768e5adf9283" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b04c6fb71e4cdd10480bc8d306aca6d2a7494e6267e4f103085a89b2ec04e4c" +dependencies = [ + "solana-instruction", + "solana-pubkey", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4c977c6c4d95c8b43a9f405844f29a73c9d8b0a7c561b91d4f6a44f290d35c" +dependencies = [ + "sha2 0.10.8", + "solana-define-syscall", + "solana-hash", +] + +[[package]] +name = "solana-short-vec" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca5799b37642e4e273d7d848564739eab45df670edcc61b4696ef0d5ebe4a8c" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-slot-hashes" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e596d3719b4c03987de87c8cc25b34b6afcf7464c82b4d9c9b114304d882c97" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4022b0e8a7f043bd61504fff79176c02b52f69a69299023884b194a1405c0f05" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82f0665dfcfcb4433708abff54db5ee105fe1bb8db7fd409074bd0275582105" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-sysvar-id" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbed7acdd711e0d620c9b7f788d041d35731c2c675d1d687498745d73826ca4" +dependencies = [ + "solana-pubkey", +] + +[[package]] +name = "solana-transaction-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae45f064c8e6006a426b31a1182123ec4daf8cca50bd7aea6e796e6205a7911e" +dependencies = [ + "solana-instruction", + "solana-sanitize", +] + +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote", + "syn 2.0.90", +] + +[[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.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[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-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "verifier_router" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "groth_16_verifier", + "ownable", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[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.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" + +[[package]] +name = "web-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[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.90", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +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.90", +] diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml index 48b5fd2..16c25d4 100644 --- a/solana-examples/hello-world/host/Cargo.toml +++ b/solana-examples/hello-world/host/Cargo.toml @@ -5,15 +5,20 @@ edition = "2021" [dependencies] methods = { path = "../methods" } -risc0-zkvm = { version = "1.1.3" } +risc0-zkvm = { version = "1.2.0", default-features = false, features = ["prove"]} tracing-subscriber = { version = "0.3", features = ["env-filter"] } serde = "1.0" solana-examples = { path = "../../programs/solana-examples", features = ["no-entrypoint"] } -anchor-client = { version = "0.30.1" } +groth_16_verifier = { path = "../../../solana-verifier/programs/groth_16_verifier", features = ["no-entrypoint", "client"]} +verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["no-entrypoint"]} +anchor-client = { version = "0.30.1", features = ["async"]} serde_json = "1.0.133" -solana-program = "=1.18.20" +solana-program = "2.1.6" +tokio = { version = "1.42.0", features = ["macros"] } +tracing = "0.1.41" +clap = { version = "4.5.23", features = ["derive"] } # Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 [patch.crates-io] -curve25519-dalek = { git = 'https://github.com/ivs/curve25519-dalek', branch='rustls-dep-hell' } \ No newline at end of file +curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index 10f27ce..a3e0ea6 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -1,59 +1,101 @@ +use anchor_client::anchor_lang::accounts::program; +use anchor_client::anchor_lang::system_program::ID as SYSTEM_PROGRAM_ID; +use anchor_client::anchor_lang::Key; +use anchor_client::solana_client::{ + nonblocking::rpc_client::RpcClient, rpc_config::RpcRequestAirdropConfig, +}; +use anchor_client::solana_sdk::{ + commitment_config::{CommitmentConfig, CommitmentLevel}, + pubkey::Pubkey, +}; +use anchor_client::Program; // These constants represent the RISC-V ELF and the image ID generated by risc0-build. // The ELF is used for proving and the ID is used for verification. +use anchor_client::{ + solana_sdk::{signature::Keypair, signer::Signer, system_program}, + Client, Cluster, +}; +use groth_16_verifier::client::receipt_to_proof; +use groth_16_verifier::Proof; use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; use risc0_zkvm::{default_prover, sha::Digestible, ExecutorEnv, ProverOpts}; +use solana_program::pubkey; use std::borrow::Borrow; use std::fs::File; use std::io::{self, Write}; -use std::rc::Rc; +use std::sync::Arc; +use tokio::time::Sleep; +use tracing::instrument::WithSubscriber; +use tracing::{debug, error, info, trace}; + +use clap::Parser; +use solana_examples::{accounts, instruction, ProgramData}; + +// Provide CLI so that we can use the same program to setup our program as well +// as increment our nonce +#[derive(Parser, Debug)] +#[command(version)] +struct Args { + /// Initilize the Example Solana Program instead of incrementing the nonce + #[arg(short, long, default_value_t = false)] + init: bool, +} -fn main() { - // Initialize tracing. In order to view logs, run `RUST_LOG=info cargo run` - tracing_subscriber::fmt() - .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) - .init(); +type PROGRAM = Program>; + +const SELECTOR: u32 = 1; // Going to assume only one verifier in our test - print!("Please enter the current nonce: "); - io::stdout().flush().expect("Unable to access STDIO"); +// Used to convert our image_id from a [u32; 8] into a [u8; 32] as expected of our groth verifier +fn convert_array(input: [u32; 8]) -> [u8; 32] { + let bytes: Vec = input.iter().flat_map(|&x| x.to_le_bytes()).collect(); + bytes.try_into().unwrap() +} + +async fn init(user: Arc, example_program: PROGRAM, program_data_address: Pubkey) { + info!("Attempting to initilize program data"); + + let rpc = example_program.async_rpc(); + + let slot = rpc.get_slot().await.unwrap(); + + example_program + .request() + .accounts(accounts::Initialize { + authority: user.pubkey(), + program_data: program_data_address, + system_program: SYSTEM_PROGRAM_ID, + }) + .args(instruction::Initialize { + image_id: convert_array(HELLO_GUEST_ID), + selector: SELECTOR, + }) + .payer(user.clone()) + .signer(&user) + .send() + .await + .expect("Was unable to submit the initilization transaction"); + + info!("Transaction Successful, our program is now ready for verifying proofs"); +} - let mut buffer = String::new(); +async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) { + info!("Attempting to increment program nonce"); - io::stdin() - .read_line(&mut buffer) - .expect("Unable to read stdin"); + let program_data: ProgramData = example_program + .account(program_data_address) + .await + .expect("Was unable to find program data account for example"); - let nonce: u32 = buffer.trim().parse().expect("Unable to parse nonce value"); + let nonce: u32 = program_data.nonce; - // An executor environment describes the configurations for the zkVM - // including program inputs. - // An default ExecutorEnv can be created like so: - // `let env = ExecutorEnv::builder().build().unwrap();` - // However, this `env` does not have any inputs. - // - // To add guest input to the executor environment, use - // ExecutorEnvBuilder::write(). - // To access this method, you'll need to use ExecutorEnv::builder(), which - // creates an ExecutorEnvBuilder. When you're done adding input, call - // ExecutorEnvBuilder::build(). + info!("Current Nonce value is ${nonce}"); // Increment the current nonce for our transaction to be accepted let input: u32 = nonce + 1; - let env = ExecutorEnv::builder() - .write(&input) - .unwrap() - .build() - .unwrap(); - // Obtain the default prover. + info!("Constructing proof to increment nonce value to {input}"); let prover = default_prover(); - // extract the receipt. - let standard_prover = default_prover(); - let standard_proof = standard_prover.prove(env, HELLO_GUEST_ELF).unwrap(); - let standard_receipt = standard_proof.receipt; - - println!("Standard Receipt: {:?}", standard_receipt); - let env = ExecutorEnv::builder() .write(&input) .unwrap() @@ -69,26 +111,115 @@ fn main() { let receipt = prove_info.receipt; - let receipt_json = - serde_json::to_string_pretty(&receipt).expect("Unable to generate JSON file from receipt."); - - let mut receipt_file = - File::create("receipt.json").expect("Was unable to open file for writing."); - receipt_file - .write_all(receipt_json.as_bytes()) - .expect("Unable to write json receipt data to file."); - - let verifier_params = receipt.inner.verifier_parameters(); - let verifieer_params_json = serde_json::to_string_pretty(&verifier_params) - .expect("Was unable to generate JSON file from verifier_params."); - - let mut verifier_file = File::create("vp.json").expect("Was unable to open file for writing."); + info!("Groth 16 proof for nonce increment transaction successfuly created, submitting transaction to the program."); + + let groth16_receipt = receipt + .inner + .groth16() + .expect("Unable to get Groth 16 proof from main receipt"); + + let proof = + receipt_to_proof(groth16_receipt).expect("Unable to generate proof from Groth Receipt"); + + let (router_pda_address, _) = Pubkey::find_program_address(&[b"router"], &verifier_router::ID); + debug!("Using the address: {router_pda_address} as the Router Account"); + + // Get the verifier entry account address + let (verifier_entry_address, _) = Pubkey::find_program_address( + &[b"verifier", &SELECTOR.to_le_bytes()], + &verifier_router::ID, + ); + + debug!("Using the address: {verifier_entry_address} as the Verifier Entry Account"); + + example_program + .request() + .accounts(accounts::IncrementNonce { + program_data: program_data_address, + router: verifier_router::ID, + router_account: router_pda_address, + verifier_entry: verifier_entry_address, + system_program: SYSTEM_PROGRAM_ID, + verifier_program: groth_16_verifier::ID, + }) + .args(instruction::IncrementNonce { + journal_nonce: input, + proof: proof, + }) + .send() + .await + .expect("Unable to send increment nonce transaction"); + + info!("Transaction succesfull, nonce incremented"); +} - verifier_file - .write_all(verifieer_params_json.as_bytes()) - .expect("Unable to write Json VP data to file"); +#[tokio::main] +async fn main() { + // Initialize tracing. In order to view logs, run `RUST_LOG=info cargo run` + tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) + .init(); - // The receipt was verified at the end of proving, but the below code is an - // example of how someone else could verify this receipt. - receipt.verify(HELLO_GUEST_ID).unwrap(); + let args = Args::parse(); + info!("Example Risc0 Solana Program has started!"); + + // Construct a new user and request solana for the transaction + let user = Arc::new(Keypair::new()); + let user_address = user.pubkey(); + debug!("Generated a keypair for this transaction: {user:?}"); + let client = Client::new(Cluster::Localnet, user.clone()); + + debug!("Airdrop was completed for address: {user_address}"); + + let solana_example_address = solana_examples::ID; + debug!("Interacting with solana example program at address: {solana_example_address}"); + + let example_program = client + .program(solana_examples::ID) + .expect("Was unable to construct a client for the solana program on localnet."); + + let (program_data_address, _) = Pubkey::find_program_address(&[b"data"], &solana_examples::ID); + + debug!("Account Program Data PDA Address is: {program_data_address}"); + + let rpc = example_program.async_rpc(); + + let latest_blockhash = rpc + .get_latest_blockhash() + .await + .expect("Could not get latest blockhash"); + + rpc.request_airdrop_with_config( + &user_address, + 5000000000, + RpcRequestAirdropConfig { + recent_blockhash: Some(latest_blockhash.to_string()), + commitment: Some(CommitmentConfig { + commitment: CommitmentLevel::Finalized, + }), + }, + ) + .await + .expect("Was unable to request airdrop on localnet testnet."); + + info!("Going to loop until we have received balance from airdrop!"); + + loop { + let balance_result = rpc.get_balance(&user_address).await; + if let Ok(balance) = balance_result { + trace!("Balance is: {balance}"); + if balance > 0 { + break; + } else { + debug!("Was unable to fetch balance for user account"); + } + } + tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; + } + + if args.init { + init(user, example_program, program_data_address).await + } else { + increment_nonce(example_program, program_data_address).await + } } diff --git a/solana-examples/hello-world/methods/guest/Cargo.toml b/solana-examples/hello-world/methods/guest/Cargo.toml index 79e7b8c..3fa3eb6 100644 --- a/solana-examples/hello-world/methods/guest/Cargo.toml +++ b/solana-examples/hello-world/methods/guest/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" [workspace] [dependencies] -risc0-zkvm = { version = "1.1.3", default-features = false, features = ['std'] } +risc0-zkvm = { version = "1.2.0", default-features = false, features = ['std'] } diff --git a/solana-examples/package.json b/solana-examples/package.json index bcaa654..0a033a1 100644 --- a/solana-examples/package.json +++ b/solana-examples/package.json @@ -5,17 +5,22 @@ "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" }, "dependencies": { - "@coral-xyz/anchor": "^0.30.1" + "@codama/renderers": "^1.0.4", + "@coral-xyz/anchor": "^0.30.1", + "@solana/web3.js": "^2.0.0-rc.4", + "@types/node": "^22.10.2", + "codama": "^1.1.0", + "tslog": "^4.9.3" }, "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.3", - "ts-mocha": "^10.0.0", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", - "typescript": "^4.3.5", - "prettier": "^2.6.2" + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index d57035e..1c1f1ee 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -1,10 +1,10 @@ use anchor_lang::prelude::*; use verifier_router::cpi::accounts::Verify; -use verifier_router::program::VerifierRouter; +use verifier_router::program::VerifierRouter as VerifierRouterProgram; use verifier_router::router::{Groth16Verifier, Proof, PublicInputs, VerificationKey}; -use verifier_router::state::VerifierEntry; +use verifier_router::state::{VerifierEntry, VerifierRouter}; -declare_id!("HRA9VM1DJNhzuLhPG8k9Gb97PYocXJbRuNtZhnRmLiKC"); +declare_id!("C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo"); #[program] pub mod solana_examples { @@ -45,9 +45,9 @@ pub mod solana_examples { // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program let cpi_accounts = Verify { - router: ctx.accounts.router.to_account_info(), + router: ctx.accounts.router_account.to_account_info(), verifier_entry: ctx.accounts.verifier_entry.to_account_info(), - verifier_program: ctx.accounts.groth16_verifier.to_account_info(), + verifier_program: ctx.accounts.verifier_program.to_account_info(), system_program: ctx.accounts.system_program.to_account_info(), }; @@ -67,7 +67,7 @@ pub mod solana_examples { // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although // behaviour would be the same if I ignored the result. - verifier_router::cpi::verify(cpi_ctx, proof, selector, image_id, journal_digest).unwrap(); + verifier_router::cpi::verify(cpi_ctx, selector, proof, image_id, journal_digest).unwrap(); // If we reached this line it means that our proof was valid and we modify the program state as appropriate ctx.accounts.program_data.nonce += 1; @@ -89,6 +89,8 @@ pub struct Initialize<'info> { #[account( init, payer = authority, + seeds = [b"data"], + bump, space = 8 + 4 + 4 + 32 // discriminator + selector + nonce + image_id )] pub program_data: Account<'info, ProgramData>, @@ -106,14 +108,16 @@ pub struct IncrementNonce<'info> { pub program_data: Account<'info, ProgramData>, // The router program that will route to the correct verifier - pub router: Program<'info, VerifierRouter>, + pub router: Program<'info, VerifierRouterProgram>, + + // The router account that will be used for routing our proof + pub router_account: Account<'info, VerifierRouter>, // The PDA entry in the router that maps our selector to the actual verifier // TODO: Try chanigng to unchecked account because verifier checks the fields #[account( seeds = [ b"verifier", - router.key().as_ref(), &program_data.selector.to_le_bytes() ], bump, @@ -121,8 +125,8 @@ pub struct IncrementNonce<'info> { )] pub verifier_entry: Account<'info, VerifierEntry>, - // The actual Groth16 verifier program that will verify the proof - // CHECK: The verifier program checks are handled by the router program + /// The actual Groth16 verifier program that will verify the proof + /// CHECK: The verifier program checks are handled by the router program pub verifier_program: UncheckedAccount<'info>, pub system_program: Program<'info, System>, diff --git a/solana-examples/yarn.lock b/solana-examples/yarn.lock index b7d94b8..465cd34 100644 --- a/solana-examples/yarn.lock +++ b/solana-examples/yarn.lock @@ -9,6 +9,123 @@ dependencies: regenerator-runtime "^0.14.0" +"@codama/errors@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/errors/-/errors-1.1.0.tgz#3ee488f2a597a0508881b0759a486f5b96434d1a" + integrity sha512-njLWTPYgz5uJP02617CX0BZCHGHrHnQvKroU0z4YcJZiaMQlw3VLzb+e2ZU2X+uVpp+3ITJZ9yexuoEhJBVQdQ== + dependencies: + "@codama/node-types" "1.1.0" + chalk "^5.3.0" + commander "^12.1.0" + +"@codama/node-types@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/node-types/-/node-types-1.1.0.tgz#8223d3cb67386ec9617cb04627abecdbcd8ce8ee" + integrity sha512-+J6E0didCY0+8dr2vI6ag+FMaMr3SemvXJYKOhxKEJ6HXR/J+7cddpptXyrIhLa8R2Kw0yzIG9VjAlUGL7u8OQ== + +"@codama/nodes-from-anchor@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz#e3243ccb480e658b28c639ba99777ad35c8ae13a" + integrity sha512-9sITAJyWxjbuBqeSmiA/AzN15+65KvycPJmc0ReWWsbqBCblr0A5jeA/zFbfILRFcu6MVyJXpQvl42FZ/vAL1g== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors" "1.1.0" + "@noble/hashes" "^1.5.0" + +"@codama/nodes@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/nodes/-/nodes-1.1.0.tgz#cc843b6b8be8ee7fbdd6eaad57dd37b55a30b90d" + integrity sha512-a6lX45CqfvdU5jKx63zWVEUbyAjEKqjye3EkboKNEJIM0RDmDwtTqNuQBR8HHx9nO7EBPypxYOXtGpmVXg0xYw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/node-types" "1.1.0" + +"@codama/renderers-core@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@codama/renderers-core/-/renderers-core-1.0.1.tgz#0a0a526498c0f766d43e14786d7780386b37eeed" + integrity sha512-EOOQx2s5t6huVJRXwwLC6adyqSuDPVKIWXiDhy5uyJBRlNk18/vb4OmVoXTIWb6mS64m/j0DuyrWJWzIUUJ84w== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + +"@codama/renderers-js-umi@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/renderers-js-umi/-/renderers-js-umi-1.1.0.tgz#7af94c5fac6c799365addf02330a346a618a920d" + integrity sha512-PxHuvRlqD2jwK3QtK/eKGZ8QmRx8htcSEM8ylZWwsgs4Wtd7LZgEZezwrzTpSgGPcH3PWoYyBRfER8Q3XwrcDA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/renderers-core" "1.0.1" + "@codama/validators" "1.1.0" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + prettier "^3.3.3" + +"@codama/renderers-js@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/renderers-js/-/renderers-js-1.1.0.tgz#4c479771dcb18ca4b2e677e6a5fd69ed145665d2" + integrity sha512-LeFLDlKb726q6VARnuKCQ0qV2c0xS6s7U1jF7WrecMj3zrWy5hN1yGKKEZdItq95M0JOawbHbejjP9aiJ4R7Kw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/nodes-from-anchor" "1.0.1" + "@codama/renderers-core" "1.0.1" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + prettier "^3.3.3" + +"@codama/renderers-rust@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@codama/renderers-rust/-/renderers-rust-1.0.4.tgz#6a64cba990803ff5b7cc14a2d977804ceb4b6bc5" + integrity sha512-+THq6bCInn30dKEGGNrilnbaitA8A3pOjfsqwka/i3Aip5x5At6lk7VcQwoWzDvvcy/2FHaOVi3hmlc28d8maw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/renderers-core" "1.0.1" + "@codama/visitors-core" "1.1.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + +"@codama/renderers@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@codama/renderers/-/renderers-1.0.4.tgz#0bd80a953543a8de8d49349c793e3b8e63f740dc" + integrity sha512-4M1RGHFOoaZrbABiFREtcL3pEITxnOlVJIeMwzWY5wDE+v8C1eT6LLP6GjjljZY9FmJXrRSzTJsXbWwBzYLhKw== + dependencies: + "@codama/renderers-js" "1.1.0" + "@codama/renderers-js-umi" "1.1.0" + "@codama/renderers-rust" "1.0.4" + +"@codama/validators@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/validators/-/validators-1.1.0.tgz#804b5d0e44ed977ab82d6df0daf8ca8f68f2c23f" + integrity sha512-TVzTjN2m1bGauLnqJE12lZfZf1L2C9Hal7/i0sjNmtc3UbUL7pIH5Rp4bFSyfDuyhMD0JfxtJqr3YlK6yXoqkA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + +"@codama/visitors-core@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/visitors-core/-/visitors-core-1.1.0.tgz#b7aaf5ca92fabb91a480458cb61046c0e3b39cc9" + integrity sha512-NBJAgGmVdFIWHDsKSKjTYbIfSZRyRzgqPzmHFgRIRjy4Uw63zOwP5Yk1bctWrP6YRlGjrTunfVkOIA6QiVr6lg== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + json-stable-stringify "^1.1.1" + +"@codama/visitors@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/visitors/-/visitors-1.1.0.tgz#22ec6e0be2b3babc9cc74e80ed6a64af84f71fbb" + integrity sha512-QpAShuxemS8oplHDXNqnUnYwhJq58RZjfZ/KMIpdm88OCBnQRO4YfM/zQLEvXjA+tpwJpe4WnL6opTLLnSYThw== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/visitors-core" "1.1.0" + "@coral-xyz/anchor-errors@^0.30.1": version "0.30.1" resolved "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz" @@ -55,6 +172,40 @@ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== +"@noble/hashes@^1.5.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + +"@solana/accounts@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/accounts/-/accounts-2.0.0-rc.4.tgz#f6529f291e92cc95eafb5b549e79ea8997088902" + integrity sha512-LRznpCi1v/c+Gfp7/6t/kWDzTRZAPmzyr1Id3uRFsjOqGgeHYtdsK7Jw+9KMmO+PUrHqdRIFISZNMty/T17h4g== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/addresses@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/addresses/-/addresses-2.0.0-rc.4.tgz#13ca6dce9bf131d4990ea72f66624b041ac15166" + integrity sha512-AR9g6pZMqCZeH/dShmaqyTQRCgWtZpYPQZYMazA6I5EsrKq1A40Cfxqgb/iMNl/g3vfVunT25UASH3YwBQyL/A== + dependencies: + "@solana/assertions" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/assertions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/assertions/-/assertions-2.0.0-rc.4.tgz#0c6e921aa9b560c269a76a4a00bf15dbdbc1c0f8" + integrity sha512-CkTwoysagNAOjWynNzvrS5842/uDhEBjRbmgYRFurbWNLjo62j3eTYJKgTcMml7nc564Y4gObC5lUwWShGMZ/A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" @@ -62,6 +213,317 @@ dependencies: buffer "~6.0.3" +"@solana/codecs-core@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.4.tgz#c4280d68877a078df4b430871db159f95534fcd3" + integrity sha512-JIrTSps032mSE3wBxW3bXOqWfoy4CMy1CX/XeVCijyh5kLVxZTSDIdRTYdePdL1yzaOZF1Xysvt1DhOUgBdM+A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-data-structures@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.4.tgz#0a435341901d72c48ef56b6e7ed335c71e4e323c" + integrity sha512-smF4Z4WCbr3ppoZhhT7/e5XMG6VFSHFPDLsayt4aHUvP1clZAew5uOy0qLY0qdxbttSmfoxXqf2SUFpJw8Jadg== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-numbers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.4.tgz#ad95848d64dbaab4f6f0935d042df00802c84bba" + integrity sha512-ZJR7TaUO65+3Hzo3YOOUCS0wlzh17IW+j0MZC2LCk1R0woaypRpHKj4iSMYeQOZkMxsd9QT3WNvjFrPC2qA6Sw== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-strings@2.0.0-rc.4", "@solana/codecs-strings@rc": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.4.tgz#6a9223c074ab2422a7da3a8fc60cd398c6b8e167" + integrity sha512-LGfK2RL0BKjYYUfzu2FG/gTgCsYOMz9FKVs2ntji6WneZygPxJTV5W98K3J8Rl0JewpCSCFQH3xjLSHBJUS0fA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.4.tgz#d47a442e3da5d6109694a321e2a23f1b36fb8fe1" + integrity sha512-h9GQGYLfBifzLhyZuef5FUaZGxLW7JNLDlEYCErA7x7Ty2ssF98sswsLsWKcbv5Cz1QsW7A6xGv4PCjvIDOCxQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/options" "2.0.0-rc.4" + +"@solana/errors@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.4.tgz#4a5aa0d82206b07f31e729262f47def34397ac61" + integrity sha512-0PPaMyB81keEHG/1pnyEuiBVKctbXO641M2w3CIOrYT/wzjunfF0FTxsqq9wYJeYo0AyiefCKGgSPs6wiY2PpQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@solana/fast-stable-stringify@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0-rc.4.tgz#13cc3e8366fb60d4952f62c561f914c874240fef" + integrity sha512-5N4S+/EGZw0Y6s2aQPNTpiB2yii2oOcrfPKXSkK4ZR2GqZuA6u6BJiJeUelXeB8P24KMxOZXfzCrkBBpEzYt6w== + +"@solana/functional@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/functional/-/functional-2.0.0-rc.4.tgz#0d8cb83806ee54fd65bbf8e517183e75c6f54d6c" + integrity sha512-P/rL15Svl4sREO7tqQ6V/E8zPAlIBGBnA0T75gZYGoSY5644rCiEaFoqyMkXc9l563lj1B5vV5UU8FCPkpPwmQ== + +"@solana/instructions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/instructions/-/instructions-2.0.0-rc.4.tgz#42fe4a305c5c34c9d325e3a2461efe5f8b8956f7" + integrity sha512-k4KcNfrWQX5Zhij9mn6d10MnHEP4YD9qsG8SQHWTELbyoZt3UjzfzG2aY88ao3VDWz3S9JbFIzA11wjJ0TYFxg== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/keys@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/keys/-/keys-2.0.0-rc.4.tgz#7d438918b4d0d374bd4d2526fb184c9140e7ccdc" + integrity sha512-EcepAutaXVwiW0bQZMv2gSUd+gjxL8FrqzX+BeqkfNNe1c4GxtLHOlASOXhPEH/3iGEaz6mfV6Bn5KkctWOeEA== + dependencies: + "@solana/assertions" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/options@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.4.tgz#f6f6fd8b8f6f25605f5ee0e03e526128e7364462" + integrity sha512-5W8aswMBhcdv2pD5lHLdHIZ98ymhQNBmeFncEoVZLTrshf7KqyxZ8xtILcWNCUgOev1+yp9hMTNV9SEgrgyNrQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/programs@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/programs/-/programs-2.0.0-rc.4.tgz#d2f9fd36a705094ad47d784c00085cb5860e7323" + integrity sha512-aIspYII4+EdOtK2EZaTSYNVxSzn0R1b9Lir7S+PftmzVMLOP3R5MhVb5IJcZRByJngfW227CyKQXh34fg2wWOg== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/promises@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/promises/-/promises-2.0.0-rc.4.tgz#3e01502cff67ba473c3544d6a9cbd71eb853bdf2" + integrity sha512-NIY7rdtpw+le0P2vgXigJiGI54fE/bLpyiIKHfyYyjyTzCph8TmoHPX2Y/mmkmlri54tu5BM/X0UbIoXVi2dpw== + +"@solana/rpc-api@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-api/-/rpc-api-2.0.0-rc.4.tgz#7bd5378fdb82b0b857f97d6f2f48d46b522694d1" + integrity sha512-z6KyTvVd0WkXb8WhuLAF3vLstdGl5+FVQTgxu1BbBD94bBEUC8Zg7sZuT0AS/Qdgo4Bt/oNcgXsD2DbFmb0HpQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-parsed-types" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/rpc-parsed-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0-rc.4.tgz#eac850b5c1e94f836a051c0bdcaf337ca65604fa" + integrity sha512-UvNcfi5S6WI54/t7TFi1sgdvl9wFLnk7Rmwsuq/UksAx9FuN+bdZvywkXYioh5PkcZxaDTaupnNoGRPDFxW87g== + +"@solana/rpc-spec-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0-rc.4.tgz#23f4bb949607318e5ba954e3d1fb9eb47d3a9d6e" + integrity sha512-xmyh8+xvOcm6OgxFzHNLNWs8zSjV1xOFrTtE4g44QArmzEYylzoP9bFBUEoaZvBG9ACAvT2scvwhUEREFXRAWg== + +"@solana/rpc-spec@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec/-/rpc-spec-2.0.0-rc.4.tgz#e2f5b1937db90074e17b2164befa2e1ced3be2b2" + integrity sha512-SuME1MDYwotEDCBh0gKV50Zp2IJE/gEZc04MZBgEtEsyqB8mg9DL7PRSANJhGtx7b5gX31xw5sJmGlPHp/oUEA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-api@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0-rc.4.tgz#14ff6358a048a7a242d31ef96a08dc721b79d9a2" + integrity sha512-4TOOlYGIOqKI3vBRjQz8dZYKjExQhBUDrO1USOUm/s6GAMkNY5TVmlqvQxzo7BlsJu8f7cpK8RrQap/Ej9jHOQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-channel-websocket@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0-rc.4.tgz#43db37b4b60eecc7b3c589201cfe7ab40ea50d04" + integrity sha512-Rj8vb+f5gXrJ2KBA1+gJ1eXnjawG2vNtuL/WWd/CD1xEzmBV9oFXbzcGG7tTLsQWSM9+BcgiMGhhKg5DCnpWcQ== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-subscriptions-spec@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0-rc.4.tgz#9cd92e70cb2d1ee3f6e2eca6fabe00007894489c" + integrity sha512-B0C8TYiErD34YMgdk9fmbzTti8Xo8JFYuF/2acFRD1WPLVE3UrEJSjxrmj7Lv/bO40wHvWrhUtHtzo37s9anAA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-subscriptions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0-rc.4.tgz#8a294a5ddd59f8e381275beae25444de6a654b47" + integrity sha512-9fRn2/mr6a+7hknWaqA39lSN2hO1qOIQzaOz7zql5Gj1jKM5yorgqlXBdTuCi6pRn5zni9c4yz8fU6jVJQZnGA== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/fast-stable-stringify" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-subscriptions-api" "2.0.0-rc.4" + "@solana/rpc-subscriptions-channel-websocket" "2.0.0-rc.4" + "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/subscribable" "2.0.0-rc.4" + +"@solana/rpc-transformers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-transformers/-/rpc-transformers-2.0.0-rc.4.tgz#4c34d6493552e577f4ad0e967d387bc13e18a398" + integrity sha512-KpLkW6V/eAuQvZCdvCCNvcYQvq8XCxwCNmY6Y+ZJYU4EWCdMppGe4p+JJVL6buRRSGrTBW+muLhKKDsZdx/4VQ== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/rpc-transport-http@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0-rc.4.tgz#38bf5d2d99a62ca3d8c1f670239f4465b9df6bc9" + integrity sha512-Xu6+uEPYHPF8gAJ6KsmGXqtA02Dbv9mKykf0nazt91YP66k4HYF8PaYLbGSrNR76o4TewdbqFJlipSceMJb86w== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + undici-types "^6.20.0" + +"@solana/rpc-types@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc-types/-/rpc-types-2.0.0-rc.4.tgz#3991da33e98ea0e692d5477443cdd302f98bb04e" + integrity sha512-uSWW/VndwYF29gpvKxWo0skTxrsCKl+fYmeJz5mduIULjhr5SFdgchgb4KCcAlUMgFn4HJuwALJVHpUg0Wv10Q== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/rpc@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/rpc/-/rpc-2.0.0-rc.4.tgz#fa27311279a0ea1be844e47432d22ac6880118cb" + integrity sha512-YqQPf1raKUdle6iiEPQavaCdXCaX2XxHJIeZQ93lTvwuntoQUK8yAbT4go6eYQRwgL2SnR/0C4p5fnv8f/vR/A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + "@solana/fast-stable-stringify" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/rpc-api" "2.0.0-rc.4" + "@solana/rpc-spec" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-transformers" "2.0.0-rc.4" + "@solana/rpc-transport-http" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/signers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/signers/-/signers-2.0.0-rc.4.tgz#58fa869d8e0c5cb07a1ea1f19fa01c0f45d86208" + integrity sha512-4Wm8BsXkEpiomgmsthOregxIJibL2KIzMp2NbsTQMuzB3HzRv6ATtHoiQACqnsUm0hfTV217lE/GeJdYyqHCIA== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/subscribable@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/subscribable/-/subscribable-2.0.0-rc.4.tgz#cdeacd725bb9966f64bb90d8a02a24b717a51000" + integrity sha512-ZMEL0P/kdpKeqpPI/r/zV0aCqpA2LKzd94DVOSHgDGRFWfvotRl197PInU5rcsFH1VmPsuoFH68SZYV4+2DC9Q== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/sysvars@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/sysvars/-/sysvars-2.0.0-rc.4.tgz#aabf458ed5f143fbe03f3d45ad6bcdc3d5d87a71" + integrity sha512-z4XVv308IQL9RkGDPkACr2GHUrM/czzsXuv1kUscfmZmvmY77RQqaC85UYow0+opghnDpmEEssZRaWjMeVvkYw== + dependencies: + "@solana/accounts" "2.0.0-rc.4" + "@solana/codecs" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/transaction-confirmation@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0-rc.4.tgz#8852d796ac0b79d09ec8622602c28153cdd6b18f" + integrity sha512-ImBMZ+vkMglDECUEr8SFZw+V0Bm5TrCmNUAMqlfOgGO8v8pQUaVql0V9/KjiXu12TUYEcDZqp0PDLQ+D4I8aFg== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/promises" "2.0.0-rc.4" + "@solana/rpc" "2.0.0-rc.4" + "@solana/rpc-subscriptions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + +"@solana/transaction-messages@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transaction-messages/-/transaction-messages-2.0.0-rc.4.tgz#7098a744ca6a1f63961eaa1b59a7701d330b07d9" + integrity sha512-zdeNIb6EtD9faVzEEfXm7Td+u5ifNCxF1/QBF6oURxaUcfX7bGXJ/P3VM0wAQ80t5zBQeqm2qzUkfEvf07NllQ== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + +"@solana/transactions@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/transactions/-/transactions-2.0.0-rc.4.tgz#7246fa19e760d636ff60fb0d8eedc6df365c126a" + integrity sha512-n2TQ59S/SQ+LCyTgOZNXGT9gYMbMj+XeH2eMXFbg6ETs7Bhn0DE1lIfHQCq9m6JQEJ2lgH9NYFU+QDd3LGLUog== + dependencies: + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-data-structures" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/codecs-strings" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/web3.js@^1.68.0": version "1.95.4" resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.4.tgz" @@ -83,6 +545,30 @@ rpc-websockets "^9.0.2" superstruct "^2.0.2" +"@solana/web3.js@^2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-2.0.0-rc.4.tgz#6fe711939ed0f0977cf42b7fa8fa0d706958a82d" + integrity sha512-w1r5MjLd+6roeqMc0Dght4tLco3W9Zdoq56FnSKnbcP7Ji/L6VTdFJttf8vaIAAMDyUH5aH1yLxHrqCIW1kbrw== + dependencies: + "@solana/accounts" "2.0.0-rc.4" + "@solana/addresses" "2.0.0-rc.4" + "@solana/codecs" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + "@solana/functional" "2.0.0-rc.4" + "@solana/instructions" "2.0.0-rc.4" + "@solana/keys" "2.0.0-rc.4" + "@solana/programs" "2.0.0-rc.4" + "@solana/rpc" "2.0.0-rc.4" + "@solana/rpc-parsed-types" "2.0.0-rc.4" + "@solana/rpc-spec-types" "2.0.0-rc.4" + "@solana/rpc-subscriptions" "2.0.0-rc.4" + "@solana/rpc-types" "2.0.0-rc.4" + "@solana/signers" "2.0.0-rc.4" + "@solana/sysvars" "2.0.0-rc.4" + "@solana/transaction-confirmation" "2.0.0-rc.4" + "@solana/transaction-messages" "2.0.0-rc.4" + "@solana/transactions" "2.0.0-rc.4" + "@swc/helpers@^0.5.11": version "0.5.15" resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz" @@ -131,6 +617,13 @@ resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== +"@types/node@^22.10.2": + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== + dependencies: + undici-types "~6.20.0" + "@types/uuid@^8.3.4": version "8.3.4" resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" @@ -163,6 +656,11 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" +a-sync-waterfall@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" + integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== + agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" @@ -205,6 +703,11 @@ arrify@^1.0.0: resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +asap@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" @@ -312,6 +815,24 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +call-bind@^1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + camelcase@^6.0.0, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" @@ -338,6 +859,11 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + check-error@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" @@ -369,6 +895,16 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +codama@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/codama/-/codama-1.1.0.tgz#7f452b3821bb7589d8ee7a7e55fb62a80e8638b4" + integrity sha512-dr0iTND6q9goY0CwNmX5tk53iJ/KhziN/js/x2g4Dvl5K6tUGy+iR20yeBYw8lq1rwUDIocOEgKVq/HcKOI9yA== + dependencies: + "@codama/errors" "1.1.0" + "@codama/nodes" "1.1.0" + "@codama/validators" "1.1.0" + "@codama/visitors" "1.1.0" + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" @@ -381,11 +917,21 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^2.20.3: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -422,6 +968,15 @@ deep-eql@^4.1.3: dependencies: type-detect "^4.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + delay@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" @@ -445,11 +1000,37 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" +dunder-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80" + integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-errors "^1.3.0" + gopd "^1.2.0" + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" @@ -527,6 +1108,11 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" @@ -537,6 +1123,22 @@ get-func-name@^2.0.1, get-func-name@^2.0.2: resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== +get-intrinsic@^1.2.4: + version "1.2.6" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== + dependencies: + call-bind-apply-helpers "^1.0.1" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + function-bind "^1.1.2" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.0.0" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -556,6 +1158,11 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + growl@1.10.5: version "1.10.5" resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" @@ -566,6 +1173,25 @@ has-flag@^4.0.0: resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -635,6 +1261,11 @@ is-unicode-supported@^0.1.0: resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -670,6 +1301,16 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" +json-stable-stringify@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" @@ -682,6 +1323,11 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" @@ -721,6 +1367,11 @@ make-error@^1.1.1: resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +math-intrinsics@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" + integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== + minimatch@4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" @@ -817,6 +1468,20 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +nunjucks@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" + integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== + dependencies: + a-sync-waterfall "^1.0.0" + asap "^2.0.3" + commander "^5.1.0" + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + once@^1.3.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" @@ -868,6 +1533,11 @@ prettier@^2.6.2: resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.3.3: + version "3.4.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" @@ -920,6 +1590,18 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" @@ -1056,6 +1738,11 @@ tslib@^2.0.3, tslib@^2.8.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== +tslog@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.9.3.tgz#d4167d5f51748bdeab593945bc2d8f9827ea0dba" + integrity sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw== + type-detect@^4.0.0, type-detect@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" @@ -1066,11 +1753,21 @@ typescript@^4.3.5: resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +undici-types@^6.20.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + undici-types@~6.19.8: version "6.19.8" resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + utf-8-validate@^5.0.2: version "5.0.10" resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" diff --git a/solana-utils/Cargo.lock b/solana-utils/Cargo.lock new file mode 100644 index 0000000..d0f83b8 --- /dev/null +++ b/solana-utils/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "solana-utils" +version = "0.1.0" diff --git a/solana-utils/Cargo.toml b/solana-utils/Cargo.toml new file mode 100644 index 0000000..d620e46 --- /dev/null +++ b/solana-utils/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "solana-utils" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/solana-utils/src/lib.rs b/solana-utils/src/lib.rs new file mode 100644 index 0000000..fe6d218 --- /dev/null +++ b/solana-utils/src/lib.rs @@ -0,0 +1,37 @@ +use num_bigint::BigUint; +use risc0_zkvm::{Groth16Receipt, Groth16Seal, ReceiptClaim}; + +pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], ()> { + let x = &point[..32]; + let y = &point[32..]; + + let mut y_big = BigUint::from_bytes_be(y); + let field_modulus = BigUint::from_bytes_be(&BASE_FIELD_MODULUS_Q); + + // Negate the y-coordinate to get -g1. + y_big = field_modulus - y_big; + + // Reconstruct the point with the negated y-coordinate + let mut result = [0u8; 64]; + result[..32].copy_from_slice(x); + let y_bytes = y_big.to_bytes_be(); + result[64 - y_bytes.len()..].copy_from_slice(&y_bytes); + + Ok(result) +} + +pub fn receipt_to_proof(receipt: &Groth16Receipt) -> Result { + let seal = &receipt.seal; + if seal.len() < 256 { + return Err(()); + } + + let mut proof = Proof { + pi_a: seal[0..64].try_into().map_err(|_| ())?, + pi_b: seal[64..192].try_into().map_err(|_| ())?, + pi_c: seal[192..256].try_into().map_err(|_| ())?, + }; + + proof.pi_a = negate_g1(&proof.pi_a)?; + Ok(proof) +} diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml index d326806..2ad4e17 100644 --- a/solana-verifier/Anchor.toml +++ b/solana-verifier/Anchor.toml @@ -17,7 +17,7 @@ cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] -client = "yarn run ts-node -P ./tsconfig.json scripts/codma.ts" +client = "yarn run ts-node scripts/codma.ts" deploy = "yarn run ts-node -P ./tsconfig.json scripts/deploy.ts" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/solana-verifier/Cargo.lock b/solana-verifier/Cargo.lock index 0d12020..5f19e0c 100644 --- a/solana-verifier/Cargo.lock +++ b/solana-verifier/Cargo.lock @@ -167,7 +167,7 @@ dependencies = [ "borsh 0.10.4", "bytemuck", "getrandom 0.2.15", - "solana-program", + "solana-program 1.18.20", "thiserror", ] @@ -424,6 +424,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bincode" version = "1.3.3" @@ -468,9 +474,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" dependencies = [ "arrayref", "arrayvec", @@ -841,6 +847,34 @@ dependencies = [ "zeroize", ] +[[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 0.10.7", + "fiat-crypto", + "rand_core 0.6.4", + "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 = "derivative" version = "2.2.0" @@ -903,6 +937,27 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "five8_const" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b4f62f0f8ca357f93ae90c8c2dd1041a1f665fde2f889ea9b1787903829015" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94474d15a76982be62ca8a39570dccce148d98c238ebb7408b0a21b2c4bdddc4" + [[package]] name = "foreign-types" version = "0.5.0" @@ -984,7 +1039,7 @@ dependencies = [ "risc0-zkvm", "serde", "serde_json", - "solana-program", + "solana-program 2.1.6", ] [[package]] @@ -1592,9 +1647,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "risc0-binfmt" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" +checksum = "901fb75d62d70320adc7adae2abad354a3b7565603115dfb3134465227846475" dependencies = [ "anyhow", "borsh 1.5.1", @@ -1602,15 +1657,14 @@ dependencies = [ "risc0-zkp", "risc0-zkvm-platform", "serde", - "syn 2.0.85", "tracing", ] [[package]] name = "risc0-circuit-recursion" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90745aa984e4eb404f0e0eb6a7ab2e956d963a0dad751fb89ef138cc6e4e3afc" +checksum = "d8b0736401dd72a60a775e675bd0adba2e0e0e2ce2b73b63fda2899d9d7889b0" dependencies = [ "anyhow", "bytemuck", @@ -1623,9 +1677,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079b2c6789c6cbfee3500aff69108f853bdfe13fd0071ac1fbe3cbf7d0866420" +checksum = "6b6d7eb9ae600c2df004bf8849db2df870fd56bd5911a2ad756fb8701350b3c6" dependencies = [ "anyhow", "metal", @@ -1639,9 +1693,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" +checksum = "733491635d50b742d1f30a923aa3b83d62f35cef724bbf402dfc02e6f10f587a" dependencies = [ "bytemuck", "rand_core 0.6.4", @@ -1649,9 +1703,9 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86b43367c2f29ce1a0ee5730f0af6892e5b6197c8dded614c7ff1068afcd302" +checksum = "d5babc69b0db6906a6ff4011641109ca2ba06636096356b32208b0dfb26b3809" dependencies = [ "anyhow", "ark-bn254", @@ -1664,13 +1718,14 @@ dependencies = [ "risc0-binfmt", "risc0-zkp", "serde", + "stability", ] [[package]] name = "risc0-zkp" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" +checksum = "21eadc5099bf0d8ecaed718810dc5deaf237ae39a2fcb66e542e8f9660132617" dependencies = [ "anyhow", "blake2", @@ -1692,9 +1747,9 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11138ba073e43ec494d15728baeddbf3155fc95d5710000077eb5f7f345070" +checksum = "2b619085d02d57dcafc41eb74714682797ed666621ced1814c55bbe7ae7762ba" dependencies = [ "anyhow", "borsh 1.5.1", @@ -1712,15 +1767,16 @@ dependencies = [ "semver", "serde", "sha2 0.10.8", + "sha3", "stability", "tracing", ] [[package]] name = "risc0-zkvm-platform" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" +checksum = "26bbcc486222a0086d36244ae1f388cac1318270bca2dd23d77af2005d679edf" dependencies = [ "bytemuck", "getrandom 0.2.15", @@ -1883,6 +1939,113 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "solana-account-info" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42051fa2def3a2d9123f0e33b62a983b25c13d153a30e707b14d3c3b79a91592" +dependencies = [ + "bincode", + "serde", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", +] + +[[package]] +name = "solana-atomic-u64" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10dad9cf8527bbf74d3668505f563bd362e2e14d0fc77338d20973e881bbad0b" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-bincode" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3b178d3783809a2480c542cd7c57c06e1bab2c0f21562fcb8cd13eabd0138e" +dependencies = [ + "bincode", + "serde", + "solana-instruction", +] + +[[package]] +name = "solana-borsh" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870197ea4929500d8e6f624c3eb578912b5063bbd5c8bfbe87396cd5b4257465" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.1", +] + +[[package]] +name = "solana-clock" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b26a68f89972fddb370ba33a49340bd3419da529893d9ee851211588aee811fa" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cpi" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3b62e1ca838f92b90c25ab68c297272cee8e2256dad18806a219b05cfcd247" +dependencies = [ + "solana-account-info", + "solana-define-syscall", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-stable-layout", +] + +[[package]] +name = "solana-decode-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1323dbdb7c8ca717bcd7987a3f45619b5b6517dc3ee22a21342122a5516125c3" +dependencies = [ + "num-traits", +] + +[[package]] +name = "solana-define-syscall" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23cf0144176f94019a27ce46372661f67007232eea16cae96cb985fc25131d5" + +[[package]] +name = "solana-epoch-schedule" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60dde3613fcd1af91c2033e67ffe8c8d2bcd58085c53c842fa7903fa839ad38" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-fee-calculator" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c706f3d151d0abc197ca2fcecf877ace03d613be6fae766de12f5fb41c96b04" +dependencies = [ + "log", + "serde", + "serde_derive", +] + [[package]] name = "solana-frozen-abi" version = "1.18.20" @@ -1920,6 +2083,69 @@ dependencies = [ "syn 2.0.85", ] +[[package]] +name = "solana-hash" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a86aabbd7ebf807689a0355f053d6dc31d2131c2d83613011a374a18cc5d61b7" +dependencies = [ + "borsh 1.5.1", + "bs58 0.5.1", + "bytemuck", + "bytemuck_derive", + "js-sys", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", + "wasm-bindgen", +] + +[[package]] +name = "solana-instruction" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ed5710c998efd09ffb596cf5e7266c11cd56e3a136c8a1f940e8525fd5be6e" +dependencies = [ + "bincode", + "borsh 1.5.1", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-define-syscall", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-last-restart-slot" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5647af0980c796c942e33f1f7dbffca29b7747630b720e6975abb1d7c531f6" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-msg" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d6a46fcbbaa38193b5b6aeec531395da8dac8dcd183ac6d80d94e6513fc4ad8" +dependencies = [ + "solana-define-syscall", +] + +[[package]] +name = "solana-native-token" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa3c5006bbea99b810ad8fc6ae168fc83891b607a13a9aa6be39db71a700f87" + [[package]] name = "solana-program" version = "1.18.20" @@ -1943,7 +2169,7 @@ dependencies = [ "cc", "console_error_panic_hook", "console_log", - "curve25519-dalek", + "curve25519-dalek 3.2.1", "getrandom 0.2.15", "itertools", "js-sys", @@ -1968,13 +2194,183 @@ dependencies = [ "sha3", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-sdk-macro", + "solana-sdk-macro 1.18.20", "thiserror", "tiny-bip39", "wasm-bindgen", "zeroize", ] +[[package]] +name = "solana-program" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afc847b91b77c48113a55f7f492cc7e982e1778c6b954a05feb499f9b8c3cc4" +dependencies = [ + "base64 0.22.1", + "bincode", + "bitflags 2.6.0", + "blake3", + "borsh 0.10.4", + "borsh 1.5.1", + "bs58 0.5.1", + "bv", + "bytemuck", + "bytemuck_derive", + "console_error_panic_hook", + "console_log", + "curve25519-dalek 4.1.3", + "five8_const", + "getrandom 0.2.15", + "js-sys", + "lazy_static", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "sha3", + "solana-account-info", + "solana-atomic-u64", + "solana-bincode", + "solana-borsh", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-define-syscall", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-last-restart-slot", + "solana-msg", + "solana-native-token", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sanitize", + "solana-sdk-macro 2.1.6", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "solana-short-vec", + "solana-slot-hashes", + "solana-slot-history", + "solana-stable-layout", + "solana-sysvar-id", + "solana-transaction-error", + "thiserror", + "wasm-bindgen", +] + +[[package]] +name = "solana-program-entrypoint" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "988a49fb8231e95861d11b40931f49e06f0dea5a29241acf7cbca644c52abd6b" +dependencies = [ + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", +] + +[[package]] +name = "solana-program-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2473773ee9cebf6ba3d7d1fe911938bc2a3a694e85bea33fd7a99d397cde1202" +dependencies = [ + "borsh 1.5.1", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", +] + +[[package]] +name = "solana-program-memory" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d9e6ca90bbc3020b7b37091c05049f5de48e397545093ec303dc6eff3d4720c" +dependencies = [ + "num-traits", + "solana-define-syscall", +] + +[[package]] +name = "solana-program-option" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2334c5f9adcc25c6390fbf87ac127adbfbd8943465726e5f389159677ceba2" + +[[package]] +name = "solana-program-pack" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305475eef9404539cce0c561ab9997b875cc5509f7c553859cd059fdf93b0ab2" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-pubkey" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a954fba3af498201179981818b0ed61f95c32b4a3db5ea9cc042c971c84cdeae" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.1", + "bs58 0.5.1", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.1.3", + "five8_const", + "getrandom 0.2.15", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-decode-error", + "solana-define-syscall", + "solana-sanitize", + "solana-sha256-hasher", + "wasm-bindgen", +] + +[[package]] +name = "solana-rent" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebcc59bff8b3c773214545d038b718a3e2e63c920b8172f85725463029f7f00" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-macro 2.1.6", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sanitize" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05ecd7ec442abf0561cbf06984484d6368e71a4882213bfa68b658b0f8d6a0e" + [[package]] name = "solana-sdk-macro" version = "1.18.20" @@ -1988,6 +2384,122 @@ dependencies = [ "syn 2.0.85", ] +[[package]] +name = "solana-sdk-macro" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85df4723291cfec8ffe9dadc59d565afcae12ea9a6460b7b28c4da21c2c4a887" +dependencies = [ + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "solana-secp256k1-recover" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c38fc7bc33f78af99c4848c9a924b2b6e5d33d96f269d108777d982de72f73" +dependencies = [ + "libsecp256k1", + "solana-define-syscall", + "thiserror", +] + +[[package]] +name = "solana-serde-varint" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2fc696c10a2b02356584cbd45d83d42b01b10256cb36b5d0c3768e5adf9283" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b04c6fb71e4cdd10480bc8d306aca6d2a7494e6267e4f103085a89b2ec04e4c" +dependencies = [ + "solana-instruction", + "solana-pubkey", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4c977c6c4d95c8b43a9f405844f29a73c9d8b0a7c561b91d4f6a44f290d35c" +dependencies = [ + "sha2 0.10.8", + "solana-define-syscall", + "solana-hash", +] + +[[package]] +name = "solana-short-vec" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca5799b37642e4e273d7d848564739eab45df670edcc61b4696ef0d5ebe4a8c" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-slot-hashes" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e596d3719b4c03987de87c8cc25b34b6afcf7464c82b4d9c9b114304d882c97" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4022b0e8a7f043bd61504fff79176c02b52f69a69299023884b194a1405c0f05" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82f0665dfcfcb4433708abff54db5ee105fe1bb8db7fd409074bd0275582105" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-sysvar-id" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbed7acdd711e0d620c9b7f788d041d35731c2c675d1d687498745d73826ca4" +dependencies = [ + "solana-pubkey", +] + +[[package]] +name = "solana-transaction-error" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae45f064c8e6006a426b31a1182123ec4daf8cca50bd7aea6e796e6205a7911e" +dependencies = [ + "solana-instruction", + "solana-sanitize", +] + [[package]] name = "stability" version = "0.2.1" diff --git a/solana-verifier/package.json b/solana-verifier/package.json index 650159c..e0d326e 100644 --- a/solana-verifier/package.json +++ b/solana-verifier/package.json @@ -17,6 +17,7 @@ "codama": "^1.1.0", "deep-equal-in-any-order": "^2.0.6", "dotenv": "^16.4.7", + "fireblocks-sdk": "^5.34.0", "solana-bankrun": "^0.4.0", "tslog": "^4.9.3" }, diff --git a/solana-verifier/programs/groth_16_verifier/Cargo.toml b/solana-verifier/programs/groth_16_verifier/Cargo.toml index 179002a..4211738 100644 --- a/solana-verifier/programs/groth_16_verifier/Cargo.toml +++ b/solana-verifier/programs/groth_16_verifier/Cargo.toml @@ -15,6 +15,7 @@ no-entrypoint = [] no-idl = [] no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] +client = ["risc0-zkvm"] [dependencies] anchor-lang = "0.30.1" @@ -25,9 +26,10 @@ borsh = "1.5.1" hex = "0.4.3" num-bigint = "0.4.6" num-traits = "0.2.19" -risc0-zkp = { version = "1.1.1", default-features = false } +risc0-zkp = { version = "1.2.0", default-features = false } serde = { version = "1.0.204", features = ["derive"] } -solana-program = "=1.18.20" +solana-program = "=2.1.6" +risc0-zkvm = { version = "1.2.0", default-features = false, optional = true} # Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 [patch.crates-io] @@ -35,6 +37,5 @@ curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = " [dev-dependencies] -risc0-zkvm = { version = "1.1.1", default-features = false } serde_json = "1.0.120" arrayvec = "0.7.4" diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index 31e7f09..ec2fbe4 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -218,3 +218,46 @@ fn is_scalar_valid(scalar: &[u8; 32]) -> bool { } false // scalar == q } + +#[cfg(feature = "client")] +pub mod client { + use super::Proof; + use crate::BASE_FIELD_MODULUS_Q; + use num_bigint::BigUint; + use risc0_zkvm::{Groth16Receipt, Groth16Seal, ReceiptClaim}; + + pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], ()> { + let x = &point[..32]; + let y = &point[32..]; + + let mut y_big = BigUint::from_bytes_be(y); + let field_modulus = BigUint::from_bytes_be(&BASE_FIELD_MODULUS_Q); + + // Negate the y-coordinate to get -g1. + y_big = field_modulus - y_big; + + // Reconstruct the point with the negated y-coordinate + let mut result = [0u8; 64]; + result[..32].copy_from_slice(x); + let y_bytes = y_big.to_bytes_be(); + result[64 - y_bytes.len()..].copy_from_slice(&y_bytes); + + Ok(result) + } + + pub fn receipt_to_proof(receipt: &Groth16Receipt) -> Result { + let seal = &receipt.seal; + if seal.len() < 256 { + return Err(()); + } + + let mut proof = Proof { + pi_a: seal[0..64].try_into().map_err(|_| ())?, + pi_b: seal[64..192].try_into().map_err(|_| ())?, + pi_c: seal[192..256].try_into().map_err(|_| ())?, + }; + + proof.pi_a = negate_g1(&proof.pi_a)?; + Ok(proof) + } +} diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs index d90530e..d3ac89d 100644 --- a/solana-verifier/programs/verifier_router/src/estop/mod.rs +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -27,11 +27,9 @@ pub struct EmergencyStop<'info> { mut, seeds = [ b"verifier", - router.key().as_ref(), &selector.to_le_bytes() ], bump, - constraint = verifier_entry.router == router.key(), constraint = verifier_entry.selector == selector, constraint = verifier_entry.verifier == verifier_program.key(), close = authority diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 1a26650..80fcbb1 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -29,8 +29,8 @@ pub mod verifier_router { pub fn verify( ctx: Context, - proof: Proof, selector: u32, + proof: Proof, image_id: [u8; 32], journal_digest: [u8; 32], ) -> Result<()> { diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs index d88e942..f664af8 100644 --- a/solana-verifier/programs/verifier_router/src/router/mod.rs +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -44,11 +44,10 @@ pub struct AddVerifier<'info> { #[account( init, payer = authority, - space = 8 + 32 + 4 + 32, + space = 8 + 32 + 4, seeds = [ b"verifier", - router.key().as_ref(), - &selector.to_le_bytes() + selector.to_le_bytes().as_ref() ], bump, constraint = selector == router.verifier_count + 1 @ RouterError::SelectorInvalid @@ -92,15 +91,13 @@ pub struct Verify<'info> { pub router: Account<'info, VerifierRouter>, /// The verifier entry to use, validated using PDA derivation - /// Seeds are ["verifier", router_pubkey, selector_bytes] + /// Seeds are ["verifier", selector_bytes] #[account( seeds = [ - b"verifier", - router.key().as_ref(), - &selector.to_le_bytes() + b"verifier", + selector.to_le_bytes().as_ref() ], bump, - constraint = verifier_entry.router == router.key(), constraint = verifier_entry.selector == selector, )] pub verifier_entry: Account<'info, VerifierEntry>, @@ -154,7 +151,6 @@ pub fn add_verifier(ctx: Context, selector: u32) -> Result<()> { let router = &mut ctx.accounts.router; let entry = &mut ctx.accounts.verifier_entry; - entry.router = router.key(); entry.selector = selector; entry.verifier = ctx.accounts.verifier_program.key(); diff --git a/solana-verifier/programs/verifier_router/src/state/mod.rs b/solana-verifier/programs/verifier_router/src/state/mod.rs index 5ed1af9..13d6940 100644 --- a/solana-verifier/programs/verifier_router/src/state/mod.rs +++ b/solana-verifier/programs/verifier_router/src/state/mod.rs @@ -16,13 +16,11 @@ pub struct VerifierRouter { /// Account storing information about a registered verifier /// /// # Fields -/// * `router` - Public key of the router this entry belongs to /// * `selector` - Unique identifier for this verifier entry /// * `verifier` - Public key of the verifier program /// * `is_active` - Boolean flag indicating if this verifier is currently active #[account] pub struct VerifierEntry { - pub router: Pubkey, pub selector: u32, pub verifier: Pubkey, } diff --git a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts index e47853c..e7f72dd 100644 --- a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts +++ b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const TEST_BAD_VERIFIER_PROGRAM_ADDRESS = - 'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP' as Address<'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP'>; + 'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r' as Address<'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r'>; export enum TestBadVerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyTestBadVerifierInstruction( } export type ParsedTestBadVerifierInstruction< - TProgram extends string = 'Ax2RSfhDcVo8wx8H9tEmqgHb69sGv9HHK1yueVmMK9bP', + TProgram extends string = 'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r', > = { instructionType: TestBadVerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index 53a0983..bf6ce79 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -1,5 +1,5 @@ import { Logger } from "tslog"; -import { build_cli, deploy_cli } from "./utils/deploy"; +import { build_cli, codama_cli, deploy_cli } from "./utils/deploy"; import { changeAuthority, createRpc, @@ -31,6 +31,9 @@ async function run_deployment(): Promise { await build_cli(); logger.info("Build of Solana programs was successful"); + await codama_cli(); + logger.info("Regeneration of Typescript client code successful"); + const routerAddress = await deploy_cli( Programs.VerifierRouter, verify, diff --git a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts index 19299b4..1329e8b 100644 --- a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts +++ b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const GROTH16_VERIFIER_PROGRAM_ADDRESS = - 'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH' as Address<'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH'>; + 'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa' as Address<'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa'>; export enum Groth16VerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyGroth16VerifierInstruction( } export type ParsedGroth16VerifierInstruction< - TProgram extends string = 'BLRqPevHoJRbwNzB76PqmKURr2foFCrCVaMLtctMq5hH', + TProgram extends string = 'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa', > = { instructionType: Groth16VerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts index 023daf7..a8a040a 100644 --- a/solana-verifier/scripts/utils/deploy.ts +++ b/solana-verifier/scripts/utils/deploy.ts @@ -33,6 +33,11 @@ export async function build_cli(): Promise { } } +export async function codama_cli(): Promise { + // Run the node command to regenerate the Codama TS Client Code + await exec("anchor run client"); +} + interface DeploymentOutput { programId: string; } diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts new file mode 100644 index 0000000..6ddc5c8 --- /dev/null +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -0,0 +1,2 @@ +import { FireblocksSDK } from "fireblocks-sdk"; +const fireblocks = new FireblocksSDK(privateKey, apiKey); diff --git a/solana-verifier/scripts/utils/test.ts b/solana-verifier/scripts/utils/test.ts deleted file mode 100644 index e69de29..0000000 diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 54052c8..c48a19b 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -189,7 +189,7 @@ export async function loadKeypairFromFile( ); return keypairSigner; } -interface PDA { +export interface PDA { address: Address; bump: ProgramDerivedAddressBump; } @@ -212,11 +212,10 @@ export async function getVerifierEntryPda( selector: number ): Promise { const routerPda = await getRouterPda(routerAddress); - const routerSeedAddress = getAddressCodec().encode(routerPda.address); const selectorSeed = getU32Codec().encode(selector); const pda = await getProgramDerivedAddress({ programAddress: routerAddress, - seeds: ["verifier", routerSeedAddress, selectorSeed], + seeds: ["verifier", selectorSeed], }); return { address: pda[0], @@ -304,7 +303,7 @@ export function verifiable(): boolean { return verifiable; } -interface SolanaRpcInformation { +export interface SolanaRpcInformation { rpc: RpcFromTransport, RpcTransport>; rpc_subscription: RpcSubscriptionsFromTransport< SolanaRpcSubscriptionsApi, diff --git a/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts b/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts index f0d6e78..b4c83ae 100644 --- a/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts +++ b/solana-verifier/scripts/verify-router/accounts/verifierEntry.ts @@ -49,22 +49,16 @@ export function getVerifierEntryDiscriminatorBytes() { export type VerifierEntry = { discriminator: ReadonlyUint8Array; - router: Address; selector: number; verifier: Address; }; -export type VerifierEntryArgs = { - router: Address; - selector: number; - verifier: Address; -}; +export type VerifierEntryArgs = { selector: number; verifier: Address }; export function getVerifierEntryEncoder(): Encoder { return transformEncoder( getStructEncoder([ ['discriminator', fixEncoderSize(getBytesEncoder(), 8)], - ['router', getAddressEncoder()], ['selector', getU32Encoder()], ['verifier', getAddressEncoder()], ]), @@ -75,7 +69,6 @@ export function getVerifierEntryEncoder(): Encoder { export function getVerifierEntryDecoder(): Decoder { return getStructDecoder([ ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], - ['router', getAddressDecoder()], ['selector', getU32Decoder()], ['verifier', getAddressDecoder()], ]); @@ -146,5 +139,5 @@ export async function fetchAllMaybeVerifierEntry( } export function getVerifierEntrySize(): number { - return 76; + return 44; } diff --git a/solana-verifier/scripts/verify-router/errors/verifierRouter.ts b/solana-verifier/scripts/verify-router/errors/verifierRouter.ts index 2b8b96a..1724198 100644 --- a/solana-verifier/scripts/verify-router/errors/verifierRouter.ts +++ b/solana-verifier/scripts/verify-router/errors/verifierRouter.ts @@ -14,18 +14,42 @@ import { } from '@solana/web3.js'; import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; -/** InvalidProofOfExploit: Invalid proof of exploit */ -export const VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT = 0x1770; // 6000 +/** VerifierInvalidAuthority: Attempted to add a verifier contract that the router contract does not own and thus cannot delete */ +export const VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_AUTHORITY = 0x1770; // 6000 +/** VerifierInvalidLoader: Program provided account does not match the key in the verifier program data account */ +export const VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_LOADER = 0x1771; // 6001 +/** SelectorInvalid: Selector is not valid for this call. */ +export const VERIFIER_ROUTER_ERROR__SELECTOR_INVALID = 0x1772; // 6002 +/** SelectorNotFound: Selector not found */ +export const VERIFIER_ROUTER_ERROR__SELECTOR_NOT_FOUND = 0x1773; // 6003 +/** SelectorDeactivated: Selector has been deactivated */ +export const VERIFIER_ROUTER_ERROR__SELECTOR_DEACTIVATED = 0x1774; // 6004 +/** InvalidVerifier: Invalid verifier program */ +export const VERIFIER_ROUTER_ERROR__INVALID_VERIFIER = 0x1775; // 6005 +/** Overflow: Arithmetic overflow */ +export const VERIFIER_ROUTER_ERROR__OVERFLOW = 0x1776; // 6006 export type VerifierRouterError = - typeof VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT; + | typeof VERIFIER_ROUTER_ERROR__INVALID_VERIFIER + | typeof VERIFIER_ROUTER_ERROR__OVERFLOW + | typeof VERIFIER_ROUTER_ERROR__SELECTOR_DEACTIVATED + | typeof VERIFIER_ROUTER_ERROR__SELECTOR_INVALID + | typeof VERIFIER_ROUTER_ERROR__SELECTOR_NOT_FOUND + | typeof VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_AUTHORITY + | typeof VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_LOADER; let verifierRouterErrorMessages: | Record | undefined; if (process.env.NODE_ENV !== 'production') { verifierRouterErrorMessages = { - [VERIFIER_ROUTER_ERROR__INVALID_PROOF_OF_EXPLOIT]: `Invalid proof of exploit`, + [VERIFIER_ROUTER_ERROR__INVALID_VERIFIER]: `Invalid verifier program`, + [VERIFIER_ROUTER_ERROR__OVERFLOW]: `Arithmetic overflow`, + [VERIFIER_ROUTER_ERROR__SELECTOR_DEACTIVATED]: `Selector has been deactivated`, + [VERIFIER_ROUTER_ERROR__SELECTOR_INVALID]: `Selector is not valid for this call.`, + [VERIFIER_ROUTER_ERROR__SELECTOR_NOT_FOUND]: `Selector not found`, + [VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_AUTHORITY]: `Attempted to add a verifier contract that the router contract does not own and thus cannot delete`, + [VERIFIER_ROUTER_ERROR__VERIFIER_INVALID_LOADER]: `Program provided account does not match the key in the verifier program data account`, }; } diff --git a/solana-verifier/scripts/verify-router/instructions/addVerifier.ts b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts index df5e728..e93d116 100644 --- a/solana-verifier/scripts/verify-router/instructions/addVerifier.ts +++ b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts @@ -215,7 +215,6 @@ export async function getAddVerifierInstructionAsync< getBytesEncoder().encode( new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) ), - getAddressEncoder().encode(expectAddress(accounts.router.value)), getU32Encoder().encode(expectSome(args.selector)), ], }); diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts index f8298e8..2ae89c4 100644 --- a/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts @@ -235,7 +235,6 @@ export async function getEmergencyStopInstructionAsync< getBytesEncoder().encode( new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) ), - getAddressEncoder().encode(expectAddress(accounts.router.value)), getU32Encoder().encode(expectSome(args.selector)), ], }); diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts index df5f97a..343df50 100644 --- a/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts @@ -261,7 +261,6 @@ export async function getEmergencyStopWithProofInstructionAsync< getBytesEncoder().encode( new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) ), - getAddressEncoder().encode(expectAddress(accounts.router.value)), getU32Encoder().encode(expectSome(args.selector)), ], }); diff --git a/solana-verifier/scripts/verify-router/instructions/verify.ts b/solana-verifier/scripts/verify-router/instructions/verify.ts index 9606ffc..8a330c5 100644 --- a/solana-verifier/scripts/verify-router/instructions/verify.ts +++ b/solana-verifier/scripts/verify-router/instructions/verify.ts @@ -10,7 +10,6 @@ import { combineCodec, fixDecoderSize, fixEncoderSize, - getAddressEncoder, getBytesDecoder, getBytesEncoder, getProgramDerivedAddress, @@ -32,7 +31,6 @@ import { } from '@solana/web3.js'; import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from '../programs'; import { - expectAddress, expectSome, getAccountMetaFactory, type ResolvedAccount, @@ -83,15 +81,15 @@ export type VerifyInstruction< export type VerifyInstructionData = { discriminator: ReadonlyUint8Array; - proof: Proof; selector: number; + proof: Proof; imageId: ReadonlyUint8Array; journalDigest: ReadonlyUint8Array; }; export type VerifyInstructionDataArgs = { - proof: ProofArgs; selector: number; + proof: ProofArgs; imageId: ReadonlyUint8Array; journalDigest: ReadonlyUint8Array; }; @@ -100,8 +98,8 @@ export function getVerifyInstructionDataEncoder(): Encoder { return getStructDecoder([ ['discriminator', fixDecoderSize(getBytesDecoder(), 8)], - ['proof', getProofDecoder()], ['selector', getU32Decoder()], + ['proof', getProofDecoder()], ['imageId', fixDecoderSize(getBytesDecoder(), 32)], ['journalDigest', fixDecoderSize(getBytesDecoder(), 32)], ]); @@ -139,14 +137,14 @@ export type VerifyAsyncInput< router?: Address; /** * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", router_pubkey, selector_bytes] + * Seeds are ["verifier", selector_bytes] */ verifierEntry?: Address; /** The verifier Program account that is matched to the verifier entry */ verifierProgram: Address; systemProgram?: Address; - proof: VerifyInstructionDataArgs['proof']; selector: VerifyInstructionDataArgs['selector']; + proof: VerifyInstructionDataArgs['proof']; imageId: VerifyInstructionDataArgs['imageId']; journalDigest: VerifyInstructionDataArgs['journalDigest']; }; @@ -214,7 +212,6 @@ export async function getVerifyInstructionAsync< getBytesEncoder().encode( new Uint8Array([118, 101, 114, 105, 102, 105, 101, 114]) ), - getAddressEncoder().encode(expectAddress(accounts.router.value)), getU32Encoder().encode(expectSome(args.selector)), ], }); @@ -257,14 +254,14 @@ export type VerifyInput< router: Address; /** * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", router_pubkey, selector_bytes] + * Seeds are ["verifier", selector_bytes] */ verifierEntry: Address; /** The verifier Program account that is matched to the verifier entry */ verifierProgram: Address; systemProgram?: Address; - proof: VerifyInstructionDataArgs['proof']; selector: VerifyInstructionDataArgs['selector']; + proof: VerifyInstructionDataArgs['proof']; imageId: VerifyInstructionDataArgs['imageId']; journalDigest: VerifyInstructionDataArgs['journalDigest']; }; @@ -351,7 +348,7 @@ export type ParsedVerifyInstruction< router: TAccountMetas[0]; /** * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", router_pubkey, selector_bytes] + * Seeds are ["verifier", selector_bytes] */ verifierEntry: TAccountMetas[1]; diff --git a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts index 1240bfc..35781ba 100644 --- a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts +++ b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts @@ -26,7 +26,7 @@ import { } from '../instructions'; export const VERIFIER_ROUTER_PROGRAM_ADDRESS = - '2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK' as Address<'2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK'>; + 'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa' as Address<'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa'>; export enum VerifierRouterAccount { VerifierEntry, @@ -185,7 +185,7 @@ export function identifyVerifierRouterInstruction( } export type ParsedVerifierRouterInstruction< - TProgram extends string = '2NXuy9QcqgMMckYW7Jhb6Uxyyqb4PLqniwqowt2bwagK', + TProgram extends string = 'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa', > = | ({ instructionType: VerifierRouterInstruction.AcceptOwnership; diff --git a/solana-verifier/tests/new-tests.ts b/solana-verifier/tests/router-verifier.ts similarity index 82% rename from solana-verifier/tests/new-tests.ts rename to solana-verifier/tests/router-verifier.ts index a13e793..11fa644 100644 --- a/solana-verifier/tests/new-tests.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -16,9 +16,19 @@ import { getEmergencyStopWithProofInstruction, getEmergencyStopInstruction, fetchVerifierEntry, + getVerifyInstruction, fetchMaybeVerifierEntry, } from "../scripts/verify-router"; -import { sendTransaction, loadDefaultKeypair } from "../scripts/utils"; +import { + sendTransaction, + loadDefaultKeypair, + getRouterAddress, + getVerifierEntryPda, + PDA, + getProgramDataAddress, + getRouterPda, + changeAuthority, +} from "../scripts/utils/utils"; // Use the new web3.js, version >=2 import { @@ -55,8 +65,6 @@ import { } from "../scripts/loaderV3"; import chaiAsPromised from "chai-as-promised"; -import { getVerifyInstruction } from "../scripts/bad-verifier"; -import { assert } from "node:console"; chaiUse(deepEqualInAnyOrder); chaiUse(chaiAsPromised); @@ -86,17 +94,13 @@ describe("verifier-router", () => { let deployerKeyPair: KeyPairSigner; // Test Accounts - let router: ProgramDerivedAddress; - let grothPda: ProgramDerivedAddress; + let grothPda: PDA; let grothPDAAddress: Address; - let grothPDABump: ProgramDerivedAddressBump; let grothProgramDataAddress: Address; - let badVerifierPda: ProgramDerivedAddress; + let badVerifierPda: PDA; let badVerifierPDAAddress: Address; - let badVerifierPDABump: ProgramDerivedAddressBump; let badVerifierProgramDataAddress: Address; let routerAddress: Address; - let routerBump: ProgramDerivedAddressBump; let owner: TransactionPartialSigner; let notOwner: TransactionPartialSigner; let sendTx: ( @@ -135,62 +139,47 @@ describe("verifier-router", () => { notOwner = signers[1]; // Calculate the PDA for the Router Program - router = await getProgramDerivedAddress({ - programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, - seeds: ["router"], - }); - - routerAddress = router[0]; - routerBump = router[1]; + const routerAddressPDA = await getRouterPda( + VERIFIER_ROUTER_PROGRAM_ADDRESS + ); + routerAddress = routerAddressPDA.address; // Calculate the PDA for the Groth16 Verifier Program - const router_seed_address = getAddressCodec().encode(routerAddress); - const groth_seed_selector = getU32Codec().encode(GROTH16_SELECTOR); - const groth16_seed_address = getAddressCodec().encode( - GROTH16_VERIFIER_PROGRAM_ADDRESS + grothPda = await getVerifierEntryPda( + VERIFIER_ROUTER_PROGRAM_ADDRESS, + GROTH16_SELECTOR ); - grothPda = await getProgramDerivedAddress({ - programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, - seeds: ["verifier", router_seed_address, groth_seed_selector], - }); - - const grothProgramData = await getProgramDerivedAddress({ - programAddress: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, - seeds: [groth16_seed_address], - }); - - grothPDAAddress = grothPda[0]; - grothPDABump = grothPda[1]; + grothPDAAddress = grothPda.address; console.log(`Groth Verifier (Verifier Entry) Address: ${grothPDAAddress}`); - grothProgramDataAddress = grothProgramData[0]; - console.log(`Groth Program Data: ${grothProgramData}`); - - // Calculate the PDA for the TestBadVerifier Program - const bad_verifier_seed_selector = getU32Codec().encode(TEST_BAD_SELECTOR); - const bad_verifier_seed_address = getAddressCodec().encode( - TEST_BAD_VERIFIER_PROGRAM_ADDRESS + const grothProgramData = await getProgramDataAddress( + GROTH16_VERIFIER_PROGRAM_ADDRESS ); - badVerifierPda = await getProgramDerivedAddress({ - programAddress: VERIFIER_ROUTER_PROGRAM_ADDRESS, - seeds: ["verifier", router_seed_address, bad_verifier_seed_selector], - }); + grothProgramDataAddress = grothProgramData.address; + console.log(`Groth Program Data Address: ${grothProgramDataAddress}`); - badVerifierPDAAddress = badVerifierPda[0]; - badVerifierPDABump = badVerifierPda[1]; + // Calculate the PDA for the TestBadVerifier Program + badVerifierPda = await getVerifierEntryPda( + VERIFIER_ROUTER_PROGRAM_ADDRESS, + TEST_BAD_SELECTOR + ); + badVerifierPDAAddress = badVerifierPda.address; console.log( `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}` ); - const badVerifierProgramData = await getProgramDerivedAddress({ - programAddress: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, - seeds: [bad_verifier_seed_address], - }); + const badVerifierProgramData = await getProgramDataAddress( + TEST_BAD_VERIFIER_PROGRAM_ADDRESS + ); + + badVerifierProgramDataAddress = badVerifierProgramData.address; - badVerifierProgramDataAddress = badVerifierProgramData[0]; + console.log( + `Bad Verifier Program Data Address: ${badVerifierProgramDataAddress}` + ); }); beforeEach(async () => { @@ -251,13 +240,13 @@ describe("verifier-router", () => { }); it("Set Router as upgrade authority of testBadVerifier", async () => { - const badVerifierUpgradeTransaction = getSetAuthorityInstruction({ - bufferOrProgramDataAccount: badVerifierProgramDataAddress, - currentAuthority: deployerKeyPair, - newAuthority: routerAddress, - }); - - await sendTx(badVerifierUpgradeTransaction); + await changeAuthority( + rpc, + rpcSubscriptions, + TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + deployerKeyPair, + routerAddress + ); }); it("Sholud not allow a user to pass in a different ProgramData account then the one for the verifier being added", async () => { @@ -278,13 +267,13 @@ describe("verifier-router", () => { }); it("Set Router as upgrade authority of groth16verifier", async () => { - const grothUpgradeTransaction = getSetAuthorityInstruction({ - bufferOrProgramDataAccount: grothProgramDataAddress, - currentAuthority: deployerKeyPair, - newAuthority: routerAddress, - }); - - await sendTx(grothUpgradeTransaction); + await changeAuthority( + rpc, + rpcSubscriptions, + GROTH16_VERIFIER_PROGRAM_ADDRESS, + deployerKeyPair, + routerAddress + ); }); it("Should not allow a non-owner to add a verifier to the router", async () => { @@ -350,7 +339,6 @@ describe("verifier-router", () => { expect(routerAccount.data.verifierCount).to.equal(1); const grothAccount = await fetchVerifierEntry(rpc, grothPDAAddress); - expect(grothAccount.data.router).to.equal(routerAddress); expect(grothAccount.data.selector).to.equal(GROTH16_SELECTOR); expect(grothAccount.data.verifier).to.equal( GROTH16_VERIFIER_PROGRAM_ADDRESS @@ -359,7 +347,6 @@ describe("verifier-router", () => { await sendTx(addBadVerifierInstruction); const badAccount = await fetchVerifierEntry(rpc, badVerifierPDAAddress); - expect(badAccount.data.router).to.equal(routerAddress); expect(badAccount.data.selector).to.equal(TEST_BAD_SELECTOR); expect(badAccount.data.verifier).to.equal( TEST_BAD_VERIFIER_PROGRAM_ADDRESS @@ -373,9 +360,13 @@ describe("verifier-router", () => { // The Bad verifier will only accept proofs for null inputs const verifyInstruction = getVerifyInstruction({ + router: routerAddress, + selector: TEST_BAD_SELECTOR, + proof: emptyProof, + verifierEntry: badVerifierPDAAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, imageId: emptyImageId, journalDigest: emptyJournalDigest, - ...emptyProof, }); await sendTx(verifyInstruction); @@ -386,8 +377,12 @@ describe("verifier-router", () => { const verifyInstruction = getVerifyInstruction({ imageId: badImageId, + router: routerAddress, + selector: TEST_BAD_SELECTOR, + proof: emptyProof, + verifierEntry: badVerifierPDAAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, journalDigest: emptyJournalDigest, - ...emptyProof, }); await expectError( @@ -469,7 +464,7 @@ describe("verifier-router", () => { verifierProgram: GROTH16_VERIFIER_PROGRAM_ADDRESS, }); - await sendTx(estopProofInstruction).catch((error) => console.log(error)); + await sendTx(estopProofInstruction); const verifierEntry = await fetchMaybeVerifierEntry(rpc, grothPDAAddress); expect(verifierEntry.exists).to.equal(false); @@ -482,11 +477,15 @@ describe("verifier-router", () => { // The Bad verifier will only accept proofs for null inputs const verifyInstruction = getVerifyInstruction({ + router: routerAddress, + selector: TEST_BAD_SELECTOR, + proof: emptyProof, + verifierEntry: badVerifierPDAAddress, + verifierProgram: TEST_BAD_VERIFIER_PROGRAM_ADDRESS, imageId: emptyImageId, journalDigest: emptyJournalDigest, - ...emptyProof, }); - await expectError(sendTx(verifyInstruction), "Program is not deployed"); + await expectError(sendTx(verifyInstruction), "AccountNotInitialized"); }); }); diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index 6a598b5..6090580 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -160,6 +160,35 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" +"@ethersproject/bytes@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@multiformats/base-x@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" + integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw== + +"@noble/ciphers@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-0.4.1.tgz#977fc35f563a4ca315ebbc4cbb1f9b670bd54456" + integrity sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg== + +"@noble/curves@^1.0.0", "@noble/curves@^1.1.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== + dependencies: + "@noble/hashes" "1.6.0" + "@noble/curves@^1.4.2": version "1.6.0" resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz" @@ -172,11 +201,44 @@ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== -"@noble/hashes@^1.5.0": +"@noble/hashes@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== + +"@noble/hashes@^1.3.0", "@noble/hashes@^1.5.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== +"@notabene/pii-sdk@^1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@notabene/pii-sdk/-/pii-sdk-1.17.1.tgz#36fcf88589e42bf816354daeba52a8fb904c7a87" + integrity sha512-lCDPl58SQBAEihDIHtkghVH7fNOtdngDM9DJrDW+odEKAnB0+o6r5V+AeiNYIfRwkn8nXiCW7i3SsNMmLlj5Zw== + dependencies: + "@ethersproject/bytes" "5.7.0" + "@noble/curves" "^1.1.0" + "@stablelib/ed25519" "1.0.3" + axios "^1.6.0" + axios-oauth-client "^1.5.0" + axios-token-interceptor "^0.2.0" + base64url "3.0.1" + bs58 "5.0.0" + debug "^4.3.4" + did-jwt "^7.0" + dotenv "^16.0.3" + lodash "^4.17.21" + multibase "4.0.6" + multicodec "3.2.1" + node-fetch "^3.3.1" + tslib "^2.5.0" + uuid "^9.0.0" + +"@scure/base@^1.1.3": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== + "@solana/accounts@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/accounts/-/accounts-2.0.0-rc.4.tgz#f6529f291e92cc95eafb5b549e79ea8997088902" @@ -569,6 +631,54 @@ "@solana/transaction-messages" "2.0.0-rc.4" "@solana/transactions" "2.0.0-rc.4" +"@stablelib/binary@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" + integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== + dependencies: + "@stablelib/int" "^1.0.1" + +"@stablelib/ed25519@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" + integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== + dependencies: + "@stablelib/random" "^1.0.2" + "@stablelib/sha512" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/hash@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-1.0.1.tgz#3c944403ff2239fad8ebb9015e33e98444058bc5" + integrity sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg== + +"@stablelib/int@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" + integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== + +"@stablelib/random@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" + integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/sha512@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-1.0.1.tgz#6da700c901c2c0ceacbd3ae122a38ac57c72145f" + integrity sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw== + dependencies: + "@stablelib/binary" "^1.0.1" + "@stablelib/hash" "^1.0.1" + "@stablelib/wipe" "^1.0.1" + +"@stablelib/wipe@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" + integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== + "@swc/helpers@^0.5.11": version "0.5.13" resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz" @@ -732,6 +842,34 @@ assertion-error@^1.1.0: resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +axios-oauth-client@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/axios-oauth-client/-/axios-oauth-client-1.5.0.tgz#8e5b8aa0c6dd21e9767a96a358ce11c77fe008a3" + integrity sha512-CFuTfK9KdRnDDR6LQlUJ0GNKUZ3tHRSFdKPM9WqeCtUdcuKDgWt9aDFH7Xl87VpUcfNt5qRVl4iHdayqtXVv7g== + dependencies: + qs "^6.10.1" + +axios-token-interceptor@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/axios-token-interceptor/-/axios-token-interceptor-0.2.0.tgz#07e79f01f414c196bc84b07556cc84e02ed676bd" + integrity sha512-la74OEsXBH1IS9yI6p2oTIynPtBzs0PVUSOwOBgFg2kBwTeDqQ+YJ6jaOWxsTYyqJO510OzHTfnzAn3GFuf9xA== + dependencies: + lock "^1.1.0" + +axios@^1.6.0, axios@^1.7.7: + version "1.7.9" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" @@ -744,11 +882,21 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" +base-x@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +base64url@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" + integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== + bigint-buffer@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz" @@ -802,6 +950,13 @@ browser-stdout@1.3.1: resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== +bs58@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== + dependencies: + base-x "^4.0.0" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -809,6 +964,11 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + buffer-from@^1.0.0, buffer-from@^1.1.0: version "1.1.2" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" @@ -834,6 +994,14 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -845,11 +1013,24 @@ call-bind@^1.0.5: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bound@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" + camelcase@^6.0.0, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== +canonicalize@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-2.0.0.tgz#32be2cef4446d67fd5348027a384cae28f17226a" + integrity sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w== + chai-as-promised@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" @@ -936,6 +1117,13 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + commander@^12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" @@ -968,6 +1156,11 @@ crypto-hash@^1.3.0: resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + debug@4.3.3: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" @@ -975,11 +1168,23 @@ debug@4.3.3: dependencies: ms "2.1.2" +debug@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + decamelize@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decode-uri-component@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + deep-eql@^4.1.3: version "4.1.4" resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" @@ -1009,6 +1214,31 @@ delay@^5.0.0: resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +did-jwt@^7.0: + version "7.4.7" + resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-7.4.7.tgz#44105fb0a0cdfd78c087de52087422075c674700" + integrity sha512-Apz7nIfIHSKWIMaEP5L/K8xkwByvjezjTG0xiqwKdnNj1x8M0+Yasury5Dm/KPltxi2PlGfRPf3IejRKZrT8mQ== + dependencies: + "@noble/ciphers" "^0.4.0" + "@noble/curves" "^1.0.0" + "@noble/hashes" "^1.3.0" + "@scure/base" "^1.1.3" + canonicalize "^2.0.0" + did-resolver "^4.1.0" + multibase "^4.0.6" + multiformats "^9.6.2" + uint8arrays "3.1.1" + +did-resolver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.1.0.tgz#740852083c4fd5bf9729d528eca5d105aff45eb6" + integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA== + diff@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" @@ -1027,11 +1257,27 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dotenv@^16.4.7: +dotenv@^16.0.3, dotenv@^16.4.7: version "16.4.7" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== +dunder-proto@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -1044,11 +1290,23 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" @@ -1091,6 +1349,14 @@ fast-stable-stringify@^1.0.0: resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" @@ -1103,6 +1369,11 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== + find-up@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" @@ -1111,11 +1382,45 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +fireblocks-sdk@^5.34.0: + version "5.34.0" + resolved "https://registry.yarnpkg.com/fireblocks-sdk/-/fireblocks-sdk-5.34.0.tgz#e7083c3065d91c19b68e4644a5c8e0e4f337899c" + integrity sha512-oberKHpseK2d9HIho5VqKTsNcXk3WoADbSSl9Z+01dcRKMyz00hHQLBj9Xckg5ciNKaPEhsNxSw69dLG2gBQlg== + dependencies: + "@notabene/pii-sdk" "^1.17.1" + axios "^1.7.7" + jsonwebtoken "^9.0.2" + platform "^1.3.6" + qs "^6.11.0" + query-string "^7.1.3" + uuid "^8.3.2" + flat@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +follow-redirects@^1.15.6: + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== + +form-data@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -1152,6 +1457,22 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== + dependencies: + call-bind-apply-helpers "^1.0.1" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + function-bind "^1.1.2" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.0.0" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -1178,6 +1499,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + growl@1.10.5: version "1.10.5" resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" @@ -1205,7 +1531,12 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -hasown@^2.0.0: +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -1353,6 +1684,39 @@ jsonparse@^1.2.0: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + locate-path@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" @@ -1360,11 +1724,51 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lock@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/lock/-/lock-1.1.0.tgz#53157499d1653b136ca66451071fca615703fa55" + integrity sha512-NZQIJJL5Rb9lMJ0Yl1JoVr9GSdo4HTPsUEWsSFzB8dE8DSoiLCVavWZPi7Rnlv/o73u6I24S/XYc/NmG4l8EKA== + +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.mapvalues@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -1397,6 +1801,23 @@ make-error@^1.1.1: resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +math-intrinsics@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" + integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + minimatch@4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" @@ -1458,11 +1879,31 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +multibase@4.0.6, multibase@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-4.0.6.tgz#6e624341483d6123ca1ede956208cb821b440559" + integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ== + dependencies: + "@multiformats/base-x" "^4.0.1" + +multicodec@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-3.2.1.tgz#82de3254a0fb163a107c1aab324f2a91ef51efb2" + integrity sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw== + dependencies: + uint8arrays "^3.0.0" + varint "^6.0.0" + +multiformats@^9.4.2, multiformats@^9.6.2: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== + nanoid@3.3.1: version "3.3.1" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz" @@ -1476,6 +1917,11 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + node-fetch@^2.6.12, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" @@ -1483,6 +1929,15 @@ node-fetch@^2.6.12, node-fetch@^2.7.0: dependencies: whatwg-url "^5.0.0" +node-fetch@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + node-gyp-build@^4.3.0: version "4.8.2" resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz" @@ -1502,6 +1957,11 @@ nunjucks@^3.2.4: asap "^2.0.3" commander "^5.1.0" +object-inspect@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -1553,6 +2013,11 @@ picomatch@^2.0.4, picomatch@^2.2.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +platform@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" + integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== + prettier@^2.6.2: version "2.8.8" resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" @@ -1563,6 +2028,28 @@ prettier@^3.3.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.1.tgz#e211d451d6452db0a291672ca9154bc8c2579f7b" integrity sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg== +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +qs@^6.10.1, qs@^6.11.0: + version "6.13.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" + integrity sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg== + dependencies: + side-channel "^1.0.6" + +query-string@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" + integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== + dependencies: + decode-uri-component "^0.2.2" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" @@ -1608,6 +2095,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" @@ -1627,6 +2119,46 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + +side-channel@^1.0.6: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" @@ -1694,6 +2226,16 @@ source-map@^0.6.0: resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== + string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" @@ -1809,6 +2351,11 @@ tslib@^2.0.3, tslib@^2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz" integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== +tslib@^2.5.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tslog@^4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.9.3.tgz#d4167d5f51748bdeab593945bc2d8f9827ea0dba" @@ -1824,6 +2371,13 @@ typescript@^4.3.5: resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +uint8arrays@3.1.1, uint8arrays@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== + dependencies: + multiformats "^9.4.2" + undici-types@^6.20.0: version "6.21.0" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" @@ -1851,6 +2405,21 @@ uuid@^8.3.2: resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + +varint@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" + integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== + +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" From b1220a56d51345dd1b1e15f89e10c9a89ff59262 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Wed, 18 Dec 2024 08:54:48 -0700 Subject: [PATCH 05/21] Improve error handling, return groth verifier to using generic consts --- solana-examples/hello-world/host/Cargo.toml | 1 - solana-examples/hello-world/host/src/main.rs | 31 ++++++------------- .../programs/solana-examples/Cargo.toml | 2 +- .../programs/solana-examples/src/lib.rs | 4 +-- .../programs/groth_16_verifier/src/lib.rs | 28 ++++++++--------- solana-verifier/scripts/utils/utils.ts | 4 +-- 6 files changed, 29 insertions(+), 41 deletions(-) diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml index 16c25d4..e6119fa 100644 --- a/solana-examples/hello-world/host/Cargo.toml +++ b/solana-examples/hello-world/host/Cargo.toml @@ -16,7 +16,6 @@ serde_json = "1.0.133" solana-program = "2.1.6" tokio = { version = "1.42.0", features = ["macros"] } tracing = "0.1.41" -clap = { version = "4.5.23", features = ["derive"] } # Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index a3e0ea6..38590b5 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -28,19 +28,8 @@ use tokio::time::Sleep; use tracing::instrument::WithSubscriber; use tracing::{debug, error, info, trace}; -use clap::Parser; use solana_examples::{accounts, instruction, ProgramData}; -// Provide CLI so that we can use the same program to setup our program as well -// as increment our nonce -#[derive(Parser, Debug)] -#[command(version)] -struct Args { - /// Initilize the Example Solana Program instead of incrementing the nonce - #[arg(short, long, default_value_t = false)] - init: bool, -} - type PROGRAM = Program>; const SELECTOR: u32 = 1; // Going to assume only one verifier in our test @@ -51,13 +40,11 @@ fn convert_array(input: [u32; 8]) -> [u8; 32] { bytes.try_into().unwrap() } -async fn init(user: Arc, example_program: PROGRAM, program_data_address: Pubkey) { +async fn init(user: Arc, example_program: &PROGRAM, program_data_address: Pubkey) { info!("Attempting to initilize program data"); let rpc = example_program.async_rpc(); - let slot = rpc.get_slot().await.unwrap(); - example_program .request() .accounts(accounts::Initialize { @@ -75,7 +62,7 @@ async fn init(user: Arc, example_program: PROGRAM, program_data_address .await .expect("Was unable to submit the initilization transaction"); - info!("Transaction Successful, our program is now ready for verifying proofs"); + info!("Transaction Successful, our program is initialized and now ready for verifying proofs"); } async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) { @@ -88,7 +75,7 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) let nonce: u32 = program_data.nonce; - info!("Current Nonce value is ${nonce}"); + info!("Current Nonce value is {nonce}"); // Increment the current nonce for our transaction to be accepted let input: u32 = nonce + 1; @@ -160,7 +147,6 @@ async fn main() { .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) .init(); - let args = Args::parse(); info!("Example Risc0 Solana Program has started!"); // Construct a new user and request solana for the transaction @@ -217,9 +203,12 @@ async fn main() { tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; } - if args.init { - init(user, example_program, program_data_address).await - } else { - increment_nonce(example_program, program_data_address).await + // Check if the contract has been initilized yet + let program_data: Result = example_program.account(program_data_address).await; + + if program_data.is_err() { + info!("Could not find program data account, could be first run, initilizing program!"); + init(user, &example_program, program_data_address).await; } + increment_nonce(example_program, program_data_address).await } diff --git a/solana-examples/programs/solana-examples/Cargo.toml b/solana-examples/programs/solana-examples/Cargo.toml index 326629f..dc7090a 100644 --- a/solana-examples/programs/solana-examples/Cargo.toml +++ b/solana-examples/programs/solana-examples/Cargo.toml @@ -24,4 +24,4 @@ curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = " [dependencies] anchor-lang = "0.30.1" verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["cpi"] } -methods = { path = "../../hello-world/methods"} \ No newline at end of file +methods = { path = "../../hello-world/methods"} diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index 1c1f1ee..72f392d 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -8,7 +8,7 @@ declare_id!("C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo"); #[program] pub mod solana_examples { - use anchor_lang::solana_program::blake3::hashv; + use anchor_lang::solana_program::hash::hashv; use super::*; @@ -52,7 +52,7 @@ pub mod solana_examples { }; // We hash our journal outputs that we used for our earlier requirements to get a journal digest - let journal_digest = hashv(&[&journal_nonce.to_le_bytes()]).0; + let journal_digest = hashv(&[&journal_nonce.to_le_bytes()]).to_bytes(); // We collect the image ID that our program is expecting our proof to match so that an attacker cannot use // a proof generated from a modified program diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index ec2fbe4..f35711e 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -4,6 +4,7 @@ use anchor_lang::solana_program::alt_bn128::prelude::{ }; use anchor_lang::solana_program::hash::hashv; use anchor_lang::system_program; +use error::VerifierError; use risc0_zkp::core::digest::Digest; mod error; @@ -11,8 +12,6 @@ mod vk; pub use vk::{VerificationKey, VERIFICATION_KEY}; -use error::*; - declare_id!("Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa"); const ALLOWED_CONTROL_ROOT: &str = @@ -91,8 +90,8 @@ pub struct Proof { // TODO: Was converted into Vec because of time constrain, Anchor really not // liking generic constants #[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] -pub struct PublicInputs { - pub inputs: Vec<[u8; 32]>, +pub struct PublicInputs { + pub inputs: [[u8; 32]; N], } /// Verifies a Groth16 proof. @@ -110,17 +109,20 @@ pub struct PublicInputs { /// /// * `Ok(())` if the proof is valid. /// * `Err(ProgramError)` if the proof is invalid or an error occurs. -pub fn verify_groth_proof(proof: &Proof, public: &PublicInputs /**/) -> Result<()> { +pub fn verify_groth_proof( + proof: &Proof, + public: &PublicInputs, +) -> Result<()> { let vk = VERIFICATION_KEY; // Check vk_ic is the correct length - if vk.vk_ic.len() != public.inputs.len() + 1 { - return Err(error!(VerifierError::InvalidPublicInput)); + if vk.vk_ic.len() != N_PUBLIC + 1 { + return err!(VerifierError::InvalidPublicInput); } // Prepare public inputs let mut prepared = vk.vk_ic[0]; for (i, input) in public.inputs.iter().enumerate() { if !is_scalar_valid(input) { - return Err(error!(VerifierError::InvalidPublicInput)); + return err!(VerifierError::InvalidPublicInput); } let mul_res = alt_bn128_multiplication(&[&vk.vk_ic[i + 1][..], &input[..]].concat()) .map_err(|_| error!(VerifierError::ArithmeticError))?; @@ -149,14 +151,13 @@ pub fn verify_groth_proof(proof: &Proof, public: &PublicInputs /**/) - // Instead, it returns a 32-byte big-endian integer: // - If the pairing check passes, it returns 1 represented as a 32-byte big-endian integer (`[0u8; 31] + [1u8]`). // - If the pairing check fails, it returns 0 represented as a 32-byte big-endian integer (`[0u8; 32]`). - let pairing_res = - alt_bn128_pairing(&pairing_input).map_err(|_| error!(VerifierError::PairingError))?; + let pairing_res = alt_bn128_pairing(&pairing_input).map_err(|_| VerifierError::PairingError)?; let mut expected = [0u8; 32]; expected[31] = 1; if pairing_res != expected { - return Err(error!(VerifierError::VerificationError)); + return err!(VerifierError::VerificationError); } Ok(()) @@ -166,7 +167,7 @@ pub fn public_inputs( claim_digest: [u8; 32], allowed_control_root: &str, bn254_identity_control_id: &str, -) -> Result*/> { +) -> Result> { let allowed_control_root: Digest = digest_from_hex(allowed_control_root); let bn254_identity_control_id: Digest = digest_from_hex(bn254_identity_control_id); @@ -179,8 +180,7 @@ pub fn public_inputs( id_bn554.reverse(); let id_bn254_fr = to_fixed_array(&id_bn554); - // TODO: Remove to vec - let inputs = [a0, a1, c0, c1, id_bn254_fr].to_vec(); + let inputs = [a0, a1, c0, c1, id_bn254_fr]; Ok(PublicInputs { inputs }) } diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index c48a19b..0a825a9 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -295,8 +295,8 @@ export async function loadOwnerAddress(): Promise> { export function verifiable(): boolean { const verifiable_env = process.env.VERIFIABLE; if (verifiable_env === undefined) { - logger.debug("Verifiable builds not set, defaulting to true."); - return true; + logger.debug("Verifiable builds not set, defaulting to false."); + return false; } const verifiable = parseBoolean(verifiable_env); logger.debug(`Verifiable Builds: ${verifiable}`); From 037104b6f07a8c52de66f542d5124cc7e3c6a03e Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sun, 22 Dec 2024 03:00:41 -0700 Subject: [PATCH 06/21] Working TransactionSigner for Fireblocks V2 SDK --- solana-verifier/.gitignore | 3 +- solana-verifier/package.json | 5 +- solana-verifier/scripts/deploy.ts | 46 +++++ .../scripts/utils/fireblocksSigner.ts | 181 ++++++++++++++++- solana-verifier/scripts/utils/utils.ts | 125 +++++++++++- solana-verifier/tests/router-verifier.ts | 3 +- solana-verifier/yarn.lock | 188 +++++++++++++++++- 7 files changed, 531 insertions(+), 20 deletions(-) diff --git a/solana-verifier/.gitignore b/solana-verifier/.gitignore index 2f65bcb..754d64b 100644 --- a/solana-verifier/.gitignore +++ b/solana-verifier/.gitignore @@ -5,4 +5,5 @@ target node_modules test-ledger .yarn -.env \ No newline at end of file +.env +fireblocks_secret.key \ No newline at end of file diff --git a/solana-verifier/package.json b/solana-verifier/package.json index e0d326e..65f3a61 100644 --- a/solana-verifier/package.json +++ b/solana-verifier/package.json @@ -10,15 +10,18 @@ "@codama/nodes-from-anchor": "^1.0.1", "@codama/renderers": "^1.0.4", "@coral-xyz/anchor": "^0.30.1", + "@fireblocks/ts-sdk": "^6.0.0", "@solana/web3.js": "^2.0.0-rc.4", "@types/chai-as-promised": "^7.1.2", "@types/node": "^22.10.0", "chai-as-promised": "^7.1.2", "codama": "^1.1.0", + "decimal.js": "^10.4.3", "deep-equal-in-any-order": "^2.0.6", "dotenv": "^16.4.7", - "fireblocks-sdk": "^5.34.0", + "fireblocks-sdk": "^5.35.0", "solana-bankrun": "^0.4.0", + "solana_fireblocks_web3_provider": "https://github.com/fireblocks/solana-web3-adapter.git", "tslog": "^4.9.3" }, "devDependencies": { diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index bf6ce79..7f9461a 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -6,6 +6,9 @@ import { getLocalKeypair, getRouterPda, getTransactionSigner, + LAMPORTS_PER_SOL, + loadMinimumDeployBalance, + loadMinimumScriptBalance, Programs, verifiable, } from "./utils/utils"; @@ -22,6 +25,49 @@ async function run_deployment(): Promise { const verify = verifiable(); const rpc = createRpc(); + logger.info("Checking account balances before starting deploy."); + + let insufficient_balance = false; + const minimumDeployBalance = loadMinimumDeployBalance(); + const currentDeployBalance = await rpc.rpc + .getBalance(deployer.address) + .send(); + const minimumDeploySol = minimumDeployBalance / LAMPORTS_PER_SOL; + const currentDeploySol = currentDeployBalance.value / LAMPORTS_PER_SOL; + + if (currentDeployBalance.value < minimumDeployBalance) { + logger.error( + `Deployer Account: ${deployer.address} does not have the minimum balance of ${minimumDeploySol} SOL` + ); + logger.error(`Account shows balance of ${currentDeploySol} SOL.`); + logger.error( + "Please add more SOL to the deployer account and run again, OR change the minimum balance by setting the MINIMUM_DEPLOY_BALANCE env value" + ); + insufficient_balance = true; + } + + const minimumScriptBalance = loadMinimumScriptBalance(); + const currentScriptBalance = await rpc.rpc.getBalance(owner.address).send(); + const minimumScriptSol = minimumScriptBalance / LAMPORTS_PER_SOL; + const currentScriptSol = currentScriptBalance.value / LAMPORTS_PER_SOL; + + if (currentScriptBalance.value < minimumScriptBalance) { + logger.error( + `Owner Account: ${owner.address} does not have the minimum balance of ${minimumScriptSol} SOL` + ); + logger.error(`Account shows balance of ${currentScriptSol} SOL.`); + logger.error( + "Please add more SOL to the owner account and run again, OR change the minimum balancne by setting the MINIMUM_BALANCE env value" + ); + insufficient_balance = true; + } + + if (insufficient_balance) { + process.exit(1); + } + + logger.info("Accounts have minimum SOL balance to continue"); + // Build and deploy the Solana programs on chain logger.info("Attempting to sync keys and build programs for deployment"); diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts index 6ddc5c8..b3a3b80 100644 --- a/solana-verifier/scripts/utils/fireblocksSigner.ts +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -1,2 +1,179 @@ -import { FireblocksSDK } from "fireblocks-sdk"; -const fireblocks = new FireblocksSDK(privateKey, apiKey); +// import { Fireblocks, BasePath } from "@fireblocks/ts-sdk"; +import { + MessagePartialSigner, + TransactionPartialSigner, +} from "@solana/signers"; +import { getFireblocksCredentials, sleep, usingFireblocks } from "./utils"; +import { address } from "@solana/addresses"; +// import { ApiBaseUrl } from "solana_fireblocks_web3_provider/src/types"; +// import { +// FireblocksSDK, +// PeerType, +// TransactionArguments, +// TransactionOperation, +// } from "fireblocks-sdk"; +import { + BasePath, + CreateTransactionResponse, + Fireblocks, + TransactionOperation, + TransactionResponse, + TransactionStateEnum, +} from "@fireblocks/ts-sdk"; +import { getBase58Codec, getBase16Codec } from "@solana/web3.js"; +import { Logger } from "tslog"; +import { PeerType } from "fireblocks-sdk"; + +export type FireBlocksSigner = + MessagePartialSigner & + TransactionPartialSigner & { + fireblocks: Fireblocks; + }; + +export type FireblocksBaseUrl = "testnet" | "mainnet-beta" | "devnet"; + +const logger = new Logger(); + +export interface FireblocksConfig { + apiSecret: string; + apiKey: string; + basePath: BasePath; + assetId: string; + vaultAccountId: string; +} + +export function parseBasePath(value: string): BasePath { + switch (value.toLowerCase()) { + case "us": + return BasePath.US; + case "eu": + return BasePath.EU; + case "eu2": + return BasePath.EU2; + case "sandbox": + default: + return BasePath.Sandbox; + } +} + +export async function createSignerFromFireblocksConfig( + config: FireblocksConfig +): Promise { + // const fireblocksClient = new FireblocksSDK( + // config.apiSecret, + // config.apiKey, + // config.apiBaseUrl + // ); + + const fireblocks = new Fireblocks({ + apiKey: config.apiKey, + secretKey: config.apiSecret, + basePath: config.basePath, + }); + + const depositAddresses = + await fireblocks.vaults.getVaultAccountAssetAddressesPaginated({ + assetId: config.assetId, + vaultAccountId: config.vaultAccountId, + }); + + const depositAddress = depositAddresses.data.addresses[0]; + const publicAddress = address(depositAddress.address); + + async function waitForSignature( + tx: CreateTransactionResponse + ): Promise { + let txResponse = await fireblocks.transactions.getTransaction({ + txId: tx.id, + }); + while ( + txResponse.data.status !== TransactionStateEnum.Completed && + txResponse.data.status !== TransactionStateEnum.Broadcasting + ) { + await sleep(2000); + + txResponse = await fireblocks.transactions.getTransaction({ + txId: tx.id, + }); + } + return txResponse.data; + } + + return { + fireblocks, + address: publicAddress, + signMessages: async (messages) => { + logger.silly(`signMessages called, messages: `); + logger.silly(messages); + const rawSigner = await fireblocks.transactions.createTransaction({ + transactionRequest: { + operation: TransactionOperation.Raw, + source: { + type: PeerType.VAULT_ACCOUNT, + id: config.vaultAccountId, + }, + assetId: config.assetId, + extraParameters: { + rawMessageData: { + messages: messages.map((message) => { + logger.trace( + `Message: ${getBase16Codec().decode(message.content)}` + ); + return { content: getBase16Codec().decode(message.content) }; + }), + }, + }, + }, + }); + const signedMessage = await waitForSignature(rawSigner.data); + logger.trace(`Signed Message Completed:`); + logger.trace(signedMessage); + return signedMessage.signedMessages.map((message) => + Object.freeze({ + [publicAddress]: getBase16Codec().encode(message.signature.fullSig), + }) + ); + }, + signTransactions: async (transaction) => { + logger.silly(`signTransactions called, Transactions: `); + logger.silly(transaction); + const rawSigner = await fireblocks.transactions.createTransaction({ + transactionRequest: { + operation: TransactionOperation.Raw, + source: { + type: PeerType.VAULT_ACCOUNT, + id: config.vaultAccountId, + }, + assetId: config.assetId, + extraParameters: { + rawMessageData: { + messages: transaction.map((tx) => { + logger.trace( + `Transaction: ${getBase16Codec().decode(tx.messageBytes)}` + ); + return { content: getBase16Codec().decode(tx.messageBytes) }; + }), + }, + }, + }, + }); + const signedTransaction = await waitForSignature(rawSigner.data); + logger.trace(`Signed Transaction Completed:`); + logger.trace(signedTransaction); + return signedTransaction.signedMessages.map((message) => + Object.freeze({ + [publicAddress]: getBase16Codec().encode(message.signature.fullSig), + }) + ); + }, + }; +} + +export async function getFireblocksSigner(): Promise { + if (!usingFireblocks()) { + return null; + } + logger.info("Something is using the fireblocks signer"); + const config = await getFireblocksCredentials(); + return await createSignerFromFireblocksConfig(config); +} diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 0a825a9..0b3380a 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -36,6 +36,8 @@ import { getProgramDerivedAddress, ProgramDerivedAddressBump, getU32Codec, + Lamports, + lamports, } from "@solana/web3.js"; import { getSetAuthorityInstruction, @@ -43,6 +45,15 @@ import { } from "../loaderV3"; import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from "../verify-router"; import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../groth16"; +import Decimal from "decimal.js"; +import { + FireblocksConfig, + FireblocksCredentials, + FireblocksSolanaCluster, + getFireblocksSigner, + parseBasePath, +} from "./fireblocksSigner"; +import { FireblocksConnectionAdapterConfig } from "solana_fireblocks_web3_provider/src/types"; dotenv.config(); const logger = new Logger(); @@ -53,6 +64,8 @@ export enum Programs { TestBadVerifier = "test_bad_verifier", } +export const LAMPORTS_PER_SOL = 1_000_000_000n; + export interface SendTransactionParams< TTransaction extends BaseTransactionMessage > { @@ -180,7 +193,7 @@ export async function loadKeypairFromFile( filePath.startsWith("~") ? filePath.replace("~", os.homedir()) : filePath ); const loadedKeyBytes = Uint8Array.from( - JSON.parse(fs.readFileSync(resolvedPath, "utf8")) + JSON.parse(await fs.promises.readFile(resolvedPath, "utf8")) ); // Here you can also set the second parameter to true in case you need to extract your private key. const keypairSigner = await createKeyPairSignerFromBytes( @@ -246,8 +259,13 @@ export async function getLocalKeypair(): Promise> { } export async function getTransactionSigner(): Promise { - const keys = await getLocalKeypair(); - return keys; + if (usingFireblocks()) { + const signer = await getFireblocksSigner(); + if (signer !== null) { + return signer; + } + } + return await getLocalKeypair(); } export function getRouterAddress(): Address { @@ -292,6 +310,107 @@ export async function loadOwnerAddress(): Promise> { return keypair.address; } +function floatMulSol(float: number, value: bigint): bigint { + const floatDecimal = new Decimal(float); + const valueDecimal = new Decimal(value.toString()); + const rawResult = valueDecimal.mul(floatDecimal); + const roundedResult = rawResult.toFixed(0); + return BigInt(roundedResult); +} + +export function loadMinimumDeployBalance(): Lamports { + const balance_env = process.env.MINIMUM_DEPLOY_BALANCE; + const balance = parseFloat(balance_env) || 6; + return lamports(floatMulSol(balance, LAMPORTS_PER_SOL)); +} + +export function loadMinimumScriptBalance(): Lamports { + const balance_env = process.env.MINIMUM_BALANCE; + const balance = parseFloat(balance_env) || 1; + return lamports(floatMulSol(balance, LAMPORTS_PER_SOL)); +} + +export function usingFireblocks(): boolean { + return getFireblocksCredentials() !== null; +} + +export function getSolanaCluster(): FireblocksSolanaCluster { + const cluster_env = process.env.SOLANA_CLUSTER.toLowerCase(); + switch (cluster_env) { + case "testnet": + case "mainnet-beta": + case "devnet": + return cluster_env; + default: + logger.warn( + "SOLANA_CLUSTER environment variable not set, defaulting to devnet." + ); + return "devnet"; + } +} + +export async function getFireblocksCredentials(): Promise { + const apiSecretPath = process.env.FIREBLOCKS_PRIVATE_KEY_PATH; + const apiKey = process.env.FIREBLOCKS_API_KEY; + const basePath_env = process.env.FIREBLOCKS_BASE_PATH; + const assetId = process.env.FIREBLOCKS_ASSET_ID || "SOL_TEST"; + const vaultAccountId = process.env.FIREBLOCKS_VAULT; + const basePath = parseBasePath(basePath_env); + if (!apiSecretPath || !apiKey || !vaultAccountId) { + logger.warn("FIREBLOCKS VARIABLES USED BUT NOT ALL WHERE INCLUDED:"); + if (!apiSecretPath) { + logger.warn( + "Missing FIREBLOCKS_PRIVATE_KEY_PATH environment variable, please make sure its set" + ); + } + if (!apiKey) { + logger.warn( + "Missing FIREBLOCKS_API_KEY environment variable, please make sure its set" + ); + } + if (!vaultAccountId) { + logger.warn( + "Missing FIREBLOCKS_VAULT environment variable, please make sure its set" + ); + } + return null; + } + if (!basePath_env) { + logger.warn( + "Missing FIREBLOCKS_BASE_PATH environment variable, defaulting to sandbox" + ); + if (!process.env.FIREBLOCKS_ASSET_ID) { + logger.warn( + "Missing FIREBLOCKS_ASSET_ID environment variable, defaulting to SOL_TEST" + ); + } + } + + let apiSecret: string; + try { + const secretResolvedPath = path.resolve( + apiSecretPath.startsWith("~") + ? apiSecretPath.replace("~", os.homedir()) + : apiSecretPath + ); + apiSecret = await fs.promises.readFile(secretResolvedPath, "utf8"); + } catch (error) { + logger.error( + `Was unable to read Fireblocks Secret Key at path: ${apiSecretPath}` + ); + logger.error(error); + return null; + } + + return { + apiSecret, + assetId, + apiKey, + basePath, + vaultAccountId, + }; +} + export function verifiable(): boolean { const verifiable_env = process.env.VERIFIABLE; if (verifiable_env === undefined) { diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index 11fa644..5634482 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -27,6 +27,7 @@ import { PDA, getProgramDataAddress, getRouterPda, + LAMPORTS_PER_SOL, changeAuthority, } from "../scripts/utils/utils"; @@ -69,8 +70,6 @@ import chaiAsPromised from "chai-as-promised"; chaiUse(deepEqualInAnyOrder); chaiUse(chaiAsPromised); -const LAMPORTS_PER_SOL = 1_000_000_000n; - async function expectError( promise: Promise, errorType: string, diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index 6090580..a0f2c6c 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -172,6 +172,16 @@ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== +"@fireblocks/ts-sdk@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@fireblocks/ts-sdk/-/ts-sdk-6.0.0.tgz#6a672bafe25ce9cb761e2f3d0e1efb6a54640112" + integrity sha512-LB4XKc5B7Lr3wjQG9VKjWj2BW5tmIwA83xG2fI7breawNcrWOP8ck60OfESA0ePaSlBXk342ZE/tHX57leJC2g== + dependencies: + axios "^1.6.7" + jsonwebtoken "8.5.1" + platform "1.3.6" + uuid "8.3.2" + "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -268,13 +278,30 @@ dependencies: "@solana/errors" "2.0.0-rc.4" -"@solana/buffer-layout@^4.0.1": +"@solana/buffer-layout-utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/web3.js" "^1.32.0" + bigint-buffer "^1.1.5" + bignumber.js "^9.0.1" + +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== dependencies: buffer "~6.0.3" +"@solana/codecs-core@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz#1a2d76b9c7b9e7b7aeb3bd78be81c2ba21e3ce22" + integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== + dependencies: + "@solana/errors" "2.0.0-rc.1" + "@solana/codecs-core@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.4.tgz#c4280d68877a078df4b430871db159f95534fcd3" @@ -282,6 +309,15 @@ dependencies: "@solana/errors" "2.0.0-rc.4" +"@solana/codecs-data-structures@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz#d47b2363d99fb3d643f5677c97d64a812982b888" + integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/codecs-data-structures@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.4.tgz#0a435341901d72c48ef56b6e7ed335c71e4e323c" @@ -291,6 +327,14 @@ "@solana/codecs-numbers" "2.0.0-rc.4" "@solana/errors" "2.0.0-rc.4" +"@solana/codecs-numbers@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz#f34978ddf7ea4016af3aaed5f7577c1d9869a614" + integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/codecs-numbers@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.4.tgz#ad95848d64dbaab4f6f0935d042df00802c84bba" @@ -299,6 +343,15 @@ "@solana/codecs-core" "2.0.0-rc.4" "@solana/errors" "2.0.0-rc.4" +"@solana/codecs-strings@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz#e1d9167075b8c5b0b60849f8add69c0f24307018" + integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/codecs-strings@2.0.0-rc.4", "@solana/codecs-strings@rc": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.4.tgz#6a9223c074ab2422a7da3a8fc60cd398c6b8e167" @@ -308,6 +361,17 @@ "@solana/codecs-numbers" "2.0.0-rc.4" "@solana/errors" "2.0.0-rc.4" +"@solana/codecs@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.1.tgz#146dc5db58bd3c28e04b4c805e6096c2d2a0a875" + integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/options" "2.0.0-rc.1" + "@solana/codecs@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.4.tgz#d47a442e3da5d6109694a321e2a23f1b36fb8fe1" @@ -319,6 +383,14 @@ "@solana/codecs-strings" "2.0.0-rc.4" "@solana/options" "2.0.0-rc.4" +"@solana/errors@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.1.tgz#3882120886eab98a37a595b85f81558861b29d62" + integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + "@solana/errors@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.4.tgz#4a5aa0d82206b07f31e729262f47def34397ac61" @@ -354,6 +426,17 @@ "@solana/codecs-strings" "2.0.0-rc.4" "@solana/errors" "2.0.0-rc.4" +"@solana/options@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.1.tgz#06924ba316dc85791fc46726a51403144a85fc4d" + integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/options@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.4.tgz#f6f6fd8b8f6f25605f5ee0e03e526128e7364462" @@ -522,6 +605,31 @@ "@solana/transaction-messages" "2.0.0-rc.4" "@solana/transactions" "2.0.0-rc.4" +"@solana/spl-token-group@^0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz#83c00f0cd0bda33115468cd28b89d94f8ec1fee4" + integrity sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + +"@solana/spl-token-metadata@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz#d240947aed6e7318d637238022a7b0981b32ae80" + integrity sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + +"@solana/spl-token@^0.4.6": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.4.9.tgz#24d032d2935f237925c3b058ba6bb1e1ece5428c" + integrity sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/spl-token-group" "^0.0.7" + "@solana/spl-token-metadata" "^0.1.6" + buffer "^6.0.3" + "@solana/subscribable@2.0.0-rc.4": version "2.0.0-rc.4" resolved "https://registry.yarnpkg.com/@solana/subscribable/-/subscribable-2.0.0-rc.4.tgz#cdeacd725bb9966f64bb90d8a02a24b717a51000" @@ -586,6 +694,27 @@ "@solana/rpc-types" "2.0.0-rc.4" "@solana/transaction-messages" "2.0.0-rc.4" +"@solana/web3.js@^1.32.0": + version "1.98.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.0.tgz#21ecfe8198c10831df6f0cfde7f68370d0405917" + integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + "@solana/web3.js@^1.68.0": version "1.95.5" resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz" @@ -861,7 +990,7 @@ axios-token-interceptor@^0.2.0: dependencies: lock "^1.1.0" -axios@^1.6.0, axios@^1.7.7: +axios@^1.6.0, axios@^1.6.7, axios@^1.7.7: version "1.7.9" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== @@ -904,6 +1033,11 @@ bigint-buffer@^1.1.5: dependencies: bindings "^1.3.0" +bignumber.js@^9.0.1: + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== + binary-extensions@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" @@ -1180,6 +1314,11 @@ decamelize@^4.0.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decimal.js@^10.4.3: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + decode-uri-component@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" @@ -1382,10 +1521,10 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -fireblocks-sdk@^5.34.0: - version "5.34.0" - resolved "https://registry.yarnpkg.com/fireblocks-sdk/-/fireblocks-sdk-5.34.0.tgz#e7083c3065d91c19b68e4644a5c8e0e4f337899c" - integrity sha512-oberKHpseK2d9HIho5VqKTsNcXk3WoADbSSl9Z+01dcRKMyz00hHQLBj9Xckg5ciNKaPEhsNxSw69dLG2gBQlg== +fireblocks-sdk@^5.35.0: + version "5.35.0" + resolved "https://registry.yarnpkg.com/fireblocks-sdk/-/fireblocks-sdk-5.35.0.tgz#210aafa3cd4cdd503e488f25f05273f415f40b43" + integrity sha512-tVLxh832vowYgwNJC0SYZtvfQ9sN9lPHGLmMhfcrvbWDCjZf/mmHq2AYYROrdDqJG7lIcHdjYyyVpJs/JYTaOw== dependencies: "@notabene/pii-sdk" "^1.17.1" axios "^1.7.7" @@ -1684,6 +1823,22 @@ jsonparse@^1.2.0: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +jsonwebtoken@8.5.1: + version "8.5.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^5.6.0" + jsonwebtoken@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" @@ -1802,9 +1957,9 @@ make-error@^1.1.1: integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== math-intrinsics@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.0.0.tgz#4e04bf87c85aa51e90d078dac2252b4eb5260817" - integrity sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== mime-db@1.52.0: version "1.52.0" @@ -2013,7 +2168,7 @@ picomatch@^2.0.4, picomatch@^2.2.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -platform@^1.3.6: +platform@1.3.6, platform@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== @@ -2095,6 +2250,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +semver@^5.6.0: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + semver@^7.5.4: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" @@ -2206,6 +2366,12 @@ solana-bankrun@^0.4.0: solana-bankrun-linux-x64-gnu "0.4.0" solana-bankrun-linux-x64-musl "0.4.0" +"solana_fireblocks_web3_provider@https://github.com/fireblocks/solana-web3-adapter.git": + version "1.0.0" + resolved "https://github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd" + dependencies: + "@solana/spl-token" "^0.4.6" + sort-any@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-any/-/sort-any-2.0.0.tgz#62a5409c9905c9483f03e41e17f46cc451aa7c55" @@ -2400,7 +2566,7 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" -uuid@^8.3.2: +uuid@8.3.2, uuid@^8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== From a1be72f5346568918e612b3b6f254ff27d52ddbb Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Tue, 24 Dec 2024 03:18:03 -0700 Subject: [PATCH 07/21] fix the verification key --- .../programs/groth_16_verifier/src/vk.rs | 156 ++++++++---------- 1 file changed, 69 insertions(+), 87 deletions(-) diff --git a/solana-verifier/programs/groth_16_verifier/src/vk.rs b/solana-verifier/programs/groth_16_verifier/src/vk.rs index b9c533a..5d88605 100644 --- a/solana-verifier/programs/groth_16_verifier/src/vk.rs +++ b/solana-verifier/programs/groth_16_verifier/src/vk.rs @@ -18,96 +18,78 @@ pub struct VerificationKey { pub vk_ic: [[u8; G1_LEN]; IC_LEN], } -pub const VK_ALPHA_G1: [u8; G1_LEN] = [ - 0xe2, 0xf2, 0x6d, 0xbe, 0xa2, 0x99, 0xf5, 0x22, 0x3b, 0x64, 0x6c, 0xb1, 0xfb, 0x33, 0xea, 0xdb, - 0x05, 0x9d, 0x94, 0x07, 0x55, 0x9d, 0x74, 0x41, 0xdf, 0xd9, 0x02, 0xe3, 0xa7, 0x9a, 0x4d, 0x2d, - 0x26, 0x19, 0x4d, 0x00, 0xff, 0xca, 0x76, 0xf0, 0x01, 0x03, 0x23, 0x19, 0x0a, 0x83, 0x89, 0xce, - 0x45, 0xe3, 0x9f, 0x20, 0x60, 0xec, 0xd8, 0x61, 0xb0, 0xce, 0x37, 0x3c, 0x50, 0xdd, 0xbe, 0x14, -]; - -pub const VK_BETA_G2: [u8; G2_LEN] = [ - 0xab, 0xb7, 0x3d, 0xc1, 0x7f, 0xbc, 0x13, 0x02, 0x1e, 0x24, 0x71, 0xe0, 0xc0, 0x8b, 0xd6, 0x7d, - 0x84, 0x01, 0xf5, 0x2b, 0x73, 0xd6, 0xd0, 0x74, 0x83, 0x79, 0x4c, 0xad, 0x47, 0x78, 0x18, 0x0e, - 0x0c, 0x06, 0xf3, 0x3b, 0xbc, 0x4c, 0x79, 0xa9, 0xca, 0xde, 0xf2, 0x53, 0xa6, 0x80, 0x84, 0xd3, - 0x82, 0xf1, 0x77, 0x88, 0xf8, 0x85, 0xc9, 0xaf, 0xd1, 0x76, 0xf7, 0xcb, 0x2f, 0x03, 0x67, 0x09, - 0xc8, 0xce, 0xd0, 0x7a, 0x54, 0x06, 0x7f, 0xd5, 0xa9, 0x05, 0xea, 0x3e, 0xc6, 0xb7, 0x96, 0xf8, - 0x92, 0x91, 0x2f, 0x4d, 0xd2, 0x23, 0x31, 0x31, 0xc7, 0xa8, 0x57, 0xa4, 0xb1, 0xc1, 0x39, 0x17, - 0xa7, 0x46, 0x23, 0x11, 0x4d, 0x9a, 0xa6, 0x9d, 0x37, 0x0d, 0x7a, 0x6b, 0xc4, 0xde, 0xfd, 0xaa, - 0x3c, 0x8c, 0x3f, 0xd9, 0x47, 0xe8, 0xf5, 0x99, 0x4a, 0x70, 0x8a, 0xe0, 0xd1, 0xfb, 0x4c, 0x30, -]; - -pub const VK_GAMMA_G2: [u8; G2_LEN] = [ - 0xed, 0xf6, 0x92, 0xd9, 0x5c, 0xbd, 0xde, 0x46, 0xdd, 0xda, 0x5e, 0xf7, 0xd4, 0x22, 0x43, 0x67, - 0x79, 0x44, 0x5c, 0x5e, 0x66, 0x00, 0x6a, 0x42, 0x76, 0x1e, 0x1f, 0x12, 0xef, 0xde, 0x00, 0x18, - 0xc2, 0x12, 0xf3, 0xae, 0xb7, 0x85, 0xe4, 0x97, 0x12, 0xe7, 0xa9, 0x35, 0x33, 0x49, 0xaa, 0xf1, - 0x25, 0x5d, 0xfb, 0x31, 0xb7, 0xbf, 0x60, 0x72, 0x3a, 0x48, 0x0d, 0x92, 0x93, 0x93, 0x8e, 0x19, - 0xaa, 0x7d, 0xfa, 0x66, 0x01, 0xcc, 0xe6, 0x4c, 0x7b, 0xd3, 0x43, 0x0c, 0x69, 0xe7, 0xd1, 0xe3, - 0x8f, 0x40, 0xcb, 0x8d, 0x80, 0x71, 0xab, 0x4a, 0xeb, 0x6d, 0x8c, 0xdb, 0xa5, 0x5e, 0xc8, 0x12, - 0x5b, 0x97, 0x22, 0xd1, 0xdc, 0xda, 0xac, 0x55, 0xf3, 0x8e, 0xb3, 0x70, 0x33, 0x31, 0x4b, 0xbc, - 0x95, 0x33, 0x0c, 0x69, 0xad, 0x99, 0x9e, 0xec, 0x75, 0xf0, 0x5f, 0x58, 0xd0, 0x89, 0x06, 0x09, -]; - -pub const VK_DELTA_G2: [u8; G2_LEN] = [ - 0x33, 0x03, 0x3e, 0x7f, 0xea, 0x1f, 0x40, 0x60, 0x4e, 0xaa, 0xcf, 0x69, 0x9d, 0x4b, 0xe9, 0xaa, - 0xcc, 0x57, 0x70, 0x54, 0xa0, 0xdb, 0x22, 0xd9, 0x12, 0x9a, 0x17, 0x28, 0xff, 0x85, 0xa0, 0x1a, - 0x1c, 0x3a, 0xf8, 0x29, 0xb6, 0x2b, 0xf4, 0x91, 0x4c, 0x0b, 0xcf, 0x2c, 0x81, 0xa4, 0xbd, 0x57, - 0x71, 0x90, 0xef, 0xf5, 0xf1, 0x94, 0xee, 0x9b, 0xac, 0x95, 0xfa, 0xef, 0xd5, 0x3c, 0xb0, 0x03, - 0xd3, 0xc6, 0x3f, 0x7d, 0x18, 0xdf, 0x42, 0x71, 0x1c, 0xea, 0x2f, 0x9e, 0xd5, 0x74, 0x2d, 0x0b, - 0x2d, 0x83, 0x18, 0x83, 0x17, 0x67, 0xe8, 0x37, 0xe8, 0x57, 0xf7, 0xcb, 0x1f, 0xf3, 0x60, 0x1e, - 0x62, 0x07, 0x03, 0x0d, 0x94, 0xd2, 0x91, 0x5c, 0xca, 0x28, 0x72, 0xfb, 0x6e, 0x36, 0x68, 0xa8, - 0xae, 0xc9, 0x18, 0xd5, 0x46, 0x08, 0x49, 0xf6, 0x19, 0x0b, 0x20, 0x4f, 0x13, 0x10, 0x0c, 0x11, -]; - -pub const VK_IC: [[u8; G1_LEN]; IC_LEN] = [ - [ - 0xe4, 0x3b, 0xdc, 0x65, 0x5d, 0x0f, 0x9d, 0x73, 0x05, 0x35, 0x55, 0x4d, 0x9c, 0xaa, 0x61, - 0x1d, 0xdd, 0x15, 0x2c, 0x08, 0x1a, 0x06, 0xa9, 0x32, 0xa8, 0xe1, 0xd5, 0xdc, 0x25, 0x9a, - 0xac, 0x12, 0xd4, 0xac, 0x80, 0xe9, 0x0e, 0xc6, 0x23, 0x2b, 0xee, 0x3e, 0x0f, 0xd3, 0xa2, - 0xf5, 0x6f, 0x10, 0x69, 0x85, 0x89, 0x1c, 0x91, 0x31, 0x17, 0xd9, 0x7a, 0xbe, 0x1e, 0x58, - 0x44, 0xa7, 0x5a, 0x02, - ], - [ - 0x3f, 0x42, 0xa1, 0x88, 0xf6, 0x83, 0xd8, 0x69, 0x87, 0x3c, 0xcc, 0x4c, 0x11, 0x94, 0x42, - 0xe5, 0x7b, 0x05, 0x6e, 0x03, 0xe2, 0xfa, 0x92, 0xf2, 0x02, 0x8c, 0x97, 0xbc, 0x20, 0xb9, - 0x07, 0x07, 0x42, 0x66, 0xff, 0x87, 0x07, 0x65, 0xa4, 0x82, 0x37, 0x38, 0x03, 0xc2, 0x55, - 0x55, 0xd5, 0xd2, 0xac, 0x81, 0x34, 0xf6, 0x7b, 0x35, 0xbc, 0xf7, 0x54, 0x95, 0x58, 0xb7, - 0x94, 0xa0, 0x32, 0x2e, +// From risc0-ethereum: https://github.com/risc0/risc0-ethereum/blob/main/contracts/src/groth16/Groth16Verifier.sol +pub const VERIFICATION_KEY: VerificationKey = VerificationKey { + nr_pubinputs: 5, + vk_alpha_g1: [ + 45, 77, 154, 167, 227, 2, 217, 223, 65, 116, 157, 85, 7, 148, 157, 5, 219, 234, 51, 251, + 177, 108, 100, 59, 34, 245, 153, 162, 190, 109, 242, 226, 20, 190, 221, 80, 60, 55, 206, + 176, 97, 216, 236, 96, 32, 159, 227, 69, 206, 137, 131, 10, 25, 35, 3, 1, 240, 118, 202, + 255, 0, 77, 25, 38, ], - [ - 0x47, 0xc3, 0x0f, 0x85, 0x44, 0x46, 0x97, 0xfd, 0xf4, 0x36, 0xe3, 0x48, 0x71, 0x1c, 0x01, - 0x11, 0x15, 0x96, 0x3f, 0x85, 0x51, 0x97, 0x24, 0x3e, 0x4b, 0x39, 0xe6, 0xcb, 0xe2, 0x36, - 0xca, 0x0b, 0x8b, 0x9b, 0xdf, 0xfc, 0xb1, 0x53, 0xc1, 0x09, 0xf4, 0xf7, 0xb8, 0x6d, 0xfa, - 0xd4, 0x35, 0x84, 0x2a, 0x4e, 0x71, 0x68, 0x3d, 0xfa, 0x29, 0x37, 0x3a, 0xcf, 0x48, 0xcf, - 0x9a, 0x7c, 0xde, 0x2e, + vk_beta_g2: [ + 9, 103, 3, 47, 203, 247, 118, 209, 175, 201, 133, 248, 136, 119, 241, 130, 211, 132, 128, + 166, 83, 242, 222, 202, 169, 121, 76, 188, 59, 243, 6, 12, 14, 24, 120, 71, 173, 76, 121, + 131, 116, 208, 214, 115, 43, 245, 1, 132, 125, 214, 139, 192, 224, 113, 36, 30, 2, 19, 188, + 127, 193, 61, 183, 171, 48, 76, 251, 209, 224, 138, 112, 74, 153, 245, 232, 71, 217, 63, + 140, 60, 170, 253, 222, 196, 107, 122, 13, 55, 157, 166, 154, 77, 17, 35, 70, 167, 23, 57, + 193, 177, 164, 87, 168, 199, 49, 49, 35, 210, 77, 47, 145, 146, 248, 150, 183, 198, 62, + 234, 5, 169, 213, 127, 6, 84, 122, 208, 206, 200, ], - [ - 0xa7, 0xf2, 0x04, 0x2e, 0x11, 0xf9, 0x25, 0x5a, 0xfb, 0xb6, 0xc6, 0xe2, 0xc3, 0xac, 0xcb, - 0x88, 0xe4, 0x01, 0xf2, 0xaa, 0xc2, 0x1c, 0x09, 0x7c, 0x92, 0xb3, 0xfb, 0xdb, 0x99, 0xf9, - 0x8a, 0x1b, 0xd6, 0xcc, 0x9c, 0x67, 0x4f, 0xf0, 0x9c, 0x3e, 0x7f, 0x15, 0x60, 0x1a, 0xd8, - 0x86, 0xd5, 0x50, 0xc8, 0x81, 0x2a, 0x19, 0x9f, 0x94, 0x22, 0x57, 0x6f, 0x1b, 0x2e, 0xa9, - 0x6a, 0xa2, 0x91, 0x2b, + vk_gamma_g2: [ + 25, 142, 147, 147, 146, 13, 72, 58, 114, 96, 191, 183, 49, 251, 93, 37, 241, 170, 73, 51, + 53, 169, 231, 18, 151, 228, 133, 183, 174, 243, 18, 194, 24, 0, 222, 239, 18, 31, 30, 118, + 66, 106, 0, 102, 94, 92, 68, 121, 103, 67, 34, 212, 247, 94, 218, 221, 70, 222, 189, 92, + 217, 146, 246, 237, 9, 6, 137, 208, 88, 95, 240, 117, 236, 158, 153, 173, 105, 12, 51, 149, + 188, 75, 49, 51, 112, 179, 142, 243, 85, 172, 218, 220, 209, 34, 151, 91, 18, 200, 94, 165, + 219, 140, 109, 235, 74, 171, 113, 128, 141, 203, 64, 143, 227, 209, 231, 105, 12, 67, 211, + 123, 76, 230, 204, 1, 102, 250, 125, 170, ], - [ - 0x0d, 0xcd, 0x6c, 0x07, 0x5a, 0xda, 0x6e, 0xd0, 0xdd, 0xfe, 0xce, 0x1d, 0x4a, 0x2d, 0x00, - 0x5f, 0x61, 0xa7, 0xd5, 0xdf, 0x0b, 0x75, 0xc1, 0x8a, 0x5b, 0x23, 0x74, 0xd6, 0x4e, 0x49, - 0x5f, 0x2b, 0x82, 0x5e, 0xad, 0xb2, 0x65, 0x16, 0xe7, 0xc5, 0x12, 0xf9, 0x14, 0x8f, 0xf8, - 0x6f, 0xa7, 0xb8, 0x63, 0xa8, 0xb9, 0xcb, 0x7f, 0x81, 0xba, 0xcb, 0xb9, 0xaa, 0x20, 0x20, - 0xad, 0x20, 0xe5, 0x2f, + vk_delta_g2: [ + 3, 176, 60, 213, 239, 250, 149, 172, 155, 238, 148, 241, 245, 239, 144, 113, 87, 189, 164, + 129, 44, 207, 11, 76, 145, 244, 43, 182, 41, 248, 58, 28, 26, 160, 133, 255, 40, 23, 154, + 18, 217, 34, 219, 160, 84, 112, 87, 204, 170, 233, 75, 157, 105, 207, 170, 78, 96, 64, 31, + 234, 127, 62, 3, 51, 17, 12, 16, 19, 79, 32, 11, 25, 246, 73, 8, 70, 213, 24, 201, 174, + 168, 104, 54, 110, 251, 114, 40, 202, 92, 145, 210, 148, 13, 3, 7, 98, 30, 96, 243, 31, + 203, 247, 87, 232, 55, 232, 103, 23, 131, 24, 131, 45, 11, 45, 116, 213, 158, 47, 234, 28, + 113, 66, 223, 24, 125, 63, 198, 211, ], - [ - 0x93, 0xd4, 0xc4, 0xb1, 0x20, 0x03, 0x94, 0xd5, 0x25, 0x3c, 0xce, 0x2f, 0x25, 0xa5, 0x9b, - 0x86, 0x2e, 0xe8, 0xe4, 0xcd, 0x43, 0x68, 0x66, 0x03, 0xfa, 0xa0, 0x9d, 0x5d, 0x0d, 0x3c, - 0x1c, 0x0f, 0x09, 0xe8, 0x69, 0x0b, 0xbd, 0x01, 0xaa, 0x87, 0x82, 0xf6, 0x08, 0x36, 0x2f, - 0xbb, 0xc8, 0x8b, 0x2d, 0x48, 0x07, 0xb3, 0x07, 0x0d, 0x8c, 0xfe, 0xf6, 0x25, 0xf4, 0x74, - 0xff, 0xfc, 0x4b, 0x21, + vk_ic: [ + [ + 18, 172, 154, 37, 220, 213, 225, 168, 50, 169, 6, 26, 8, 44, 21, 221, 29, 97, 170, 156, + 77, 85, 53, 5, 115, 157, 15, 93, 101, 220, 59, 228, 2, 90, 167, 68, 88, 30, 190, 122, + 217, 23, 49, 145, 28, 137, 133, 105, 16, 111, 245, 162, 211, 15, 62, 238, 43, 35, 198, + 14, 233, 128, 172, 212, + ], + [ + 7, 7, 185, 32, 188, 151, 140, 2, 242, 146, 250, 226, 3, 110, 5, 123, 229, 66, 148, 17, + 76, 204, 60, 135, 105, 216, 131, 246, 136, 161, 66, 63, 46, 50, 160, 148, 183, 88, 149, + 84, 247, 188, 53, 123, 246, 52, 129, 172, 210, 213, 85, 85, 194, 3, 56, 55, 130, 164, + 101, 7, 135, 255, 102, 66, + ], + [ + 11, 202, 54, 226, 203, 230, 57, 75, 62, 36, 151, 81, 133, 63, 150, 21, 17, 1, 28, 113, + 72, 227, 54, 244, 253, 151, 70, 68, 133, 15, 195, 71, 46, 222, 124, 154, 207, 72, 207, + 58, 55, 41, 250, 61, 104, 113, 78, 42, 132, 53, 212, 250, 109, 184, 247, 244, 9, 193, + 83, 177, 252, 223, 155, 139, + ], + [ + 27, 138, 249, 153, 219, 251, 179, 146, 124, 9, 28, 194, 170, 242, 1, 228, 136, 203, + 172, 195, 226, 198, 182, 251, 90, 37, 249, 17, 46, 4, 242, 167, 43, 145, 162, 106, 169, + 46, 27, 111, 87, 34, 148, 159, 25, 42, 129, 200, 80, 213, 134, 216, 26, 96, 21, 127, + 62, 156, 240, 79, 103, 156, 204, 214, + ], + [ + 43, 95, 73, 78, 214, 116, 35, 91, 138, 193, 117, 11, 223, 213, 167, 97, 95, 0, 45, 74, + 29, 206, 254, 221, 208, 110, 218, 90, 7, 108, 205, 13, 47, 229, 32, 173, 32, 32, 170, + 185, 203, 186, 129, 127, 203, 185, 168, 99, 184, 167, 111, 248, 143, 20, 249, 18, 197, + 231, 22, 101, 178, 173, 94, 130, + ], + [ + 15, 28, 60, 13, 93, 157, 160, 250, 3, 102, 104, 67, 205, 228, 232, 46, 134, 155, 165, + 37, 47, 206, 60, 37, 213, 148, 3, 32, 177, 196, 212, 147, 33, 75, 252, 255, 116, 244, + 37, 246, 254, 140, 13, 7, 179, 7, 72, 45, 139, 200, 187, 47, 54, 8, 246, 130, 135, 170, + 1, 189, 11, 105, 232, 9, + ], ], -]; - -pub const VERIFICATION_KEY: VerificationKey = VerificationKey { - nr_pubinputs: 5, - vk_alpha_g1: VK_ALPHA_G1, - vk_beta_g2: VK_BETA_G2, - vk_gamma_g2: VK_GAMMA_G2, - vk_delta_g2: VK_DELTA_G2, - vk_ic: VK_IC, }; From e1498eade42d81510e534920c606cbf85a269924 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Tue, 24 Dec 2024 05:20:35 -0700 Subject: [PATCH 08/21] Clean up the typescript typing issues, and patch the logger --- solana-verifier/Anchor.toml | 7 +- solana-verifier/package.json | 16 +- solana-verifier/scripts/acceptOwnership.ts | 4 +- solana-verifier/scripts/addVerifier.ts | 4 +- solana-verifier/scripts/deploy.ts | 13 +- solana-verifier/scripts/estop.ts | 4 +- solana-verifier/scripts/renounceOwnership.ts | 4 +- solana-verifier/scripts/transferOwnership.ts | 4 +- solana-verifier/scripts/utils/addVerifier.ts | 4 +- solana-verifier/scripts/utils/deploy.ts | 1 - solana-verifier/scripts/utils/estop.ts | 4 +- .../scripts/utils/fireblocksSigner.ts | 44 +- solana-verifier/scripts/utils/init.ts | 4 +- solana-verifier/scripts/utils/ownership.ts | 5 +- solana-verifier/scripts/utils/utils.ts | 74 ++- solana-verifier/tests/router-verifier.ts | 5 +- solana-verifier/tsconfig.json | 2 +- solana-verifier/yarn.lock | 620 +++++++++++++++++- 18 files changed, 733 insertions(+), 86 deletions(-) diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml index 2ad4e17..8af0fc7 100644 --- a/solana-verifier/Anchor.toml +++ b/solana-verifier/Anchor.toml @@ -18,7 +18,12 @@ wallet = "~/.config/solana/id.json" [scripts] client = "yarn run ts-node scripts/codma.ts" -deploy = "yarn run ts-node -P ./tsconfig.json scripts/deploy.ts" +deploy = "yarn run ts-node scripts/deploy.ts" +estop = "yarn run ts-node scripts/estop.ts" +renounce = "yarn run ts-node scripts/renounceOwnership.ts" +transfer = "yarn run ts-node scripts/transferOwnership.ts" +add = "yarn run ts-node scripts/addVerifier.ts" +accept = "yarn run ts-node scripts/acceptOwnership.ts" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [test] diff --git a/solana-verifier/package.json b/solana-verifier/package.json index 65f3a61..72d6842 100644 --- a/solana-verifier/package.json +++ b/solana-verifier/package.json @@ -3,13 +3,19 @@ "scripts": { "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", - "client": "ts-node -P ./tsconfig.json scripts/codma.ts", - "deploy": "ts-node -P ./tsconfig.json scripts/deploy.ts" + "client": "yarn run ts-node scripts/codma.ts", + "deploy": "yarn run ts-node scripts/deploy.ts", + "estop": "yarn run ts-node scripts/estop.ts", + "renounce": "yarn run ts-node scripts/renounceOwnership.ts", + "transfer": "yarn run ts-node scripts/transferOwnership.ts", + "add": "yarn run ts-node scripts/addVerifier.ts", + "accept": "yarn run ts-node scripts/acceptOwnership.ts" }, "dependencies": { "@codama/nodes-from-anchor": "^1.0.1", "@codama/renderers": "^1.0.4", "@coral-xyz/anchor": "^0.30.1", + "@eslint/js": "^9.17.0", "@fireblocks/ts-sdk": "^6.0.0", "@solana/web3.js": "^2.0.0-rc.4", "@types/chai-as-promised": "^7.1.2", @@ -19,10 +25,12 @@ "decimal.js": "^10.4.3", "deep-equal-in-any-order": "^2.0.6", "dotenv": "^16.4.7", + "eslint": "^9.17.0", "fireblocks-sdk": "^5.35.0", "solana-bankrun": "^0.4.0", "solana_fireblocks_web3_provider": "https://github.com/fireblocks/solana-web3-adapter.git", - "tslog": "^4.9.3" + "tslog": "^4.9.3", + "typescript-eslint": "^8.18.2" }, "devDependencies": { "@types/bn.js": "^5.1.0", @@ -32,7 +40,7 @@ "mocha": "^9.0.3", "prettier": "^2.6.2", "ts-mocha": "^10.0.0", - "typescript": "^4.3.5" + "typescript": "^5.7.2" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/solana-verifier/scripts/acceptOwnership.ts b/solana-verifier/scripts/acceptOwnership.ts index 68dfd60..b8c301a 100644 --- a/solana-verifier/scripts/acceptOwnership.ts +++ b/solana-verifier/scripts/acceptOwnership.ts @@ -1,5 +1,5 @@ -import { Logger } from "tslog"; import { + createLogger, createRpc, getNewOwnerAddress, getRouterAddress, @@ -7,7 +7,7 @@ import { } from "./utils/utils"; import { acceptOwnership } from "./utils/ownership"; -const logger = new Logger(); +const logger = createLogger(); async function runAcceptOwnership() { logger.info("Verifier Router Ownership Acceptance Script started"); diff --git a/solana-verifier/scripts/addVerifier.ts b/solana-verifier/scripts/addVerifier.ts index 06427b3..646d47f 100644 --- a/solana-verifier/scripts/addVerifier.ts +++ b/solana-verifier/scripts/addVerifier.ts @@ -1,4 +1,3 @@ -import { Logger } from "tslog"; import { createRpc, changeAuthority, @@ -7,10 +6,11 @@ import { getTransactionSigner, getVerifierAddress, getRouterPda, + createLogger, } from "./utils/utils"; import { addVerifier } from "./utils/addVerifier"; -const logger = new Logger(); +const logger = createLogger(); async function runAddVerifier() { logger.info("Running script to add a new verifier to the Router"); const verifierAddress = getVerifierAddress(); diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index 7f9461a..7c6c883 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -1,7 +1,15 @@ -import { Logger } from "tslog"; +/** + * Risc0 Verifier Router and Initial Groth16 Verifier deployment script. + * This script will build, deploy, and initialize the Risc0 Prover Router + * and Initial Groth16 Verifier program on the Solana blockchain. You can modify how + * it operates by setting environment variables. This program requires the deployment + * address to have at least 5 SOL before it starts and the owner address that will + * initialize the programs to have at least 1 SOL. + */ import { build_cli, codama_cli, deploy_cli } from "./utils/deploy"; import { changeAuthority, + createLogger, createRpc, getLocalKeypair, getRouterPda, @@ -14,8 +22,9 @@ import { } from "./utils/utils"; import { initilizeRouter } from "./utils/init"; import { addVerifier } from "./utils/addVerifier"; +import { Lamports } from "@solana/web3.js"; -const logger = new Logger(); +const logger = createLogger(); async function run_deployment(): Promise { logger.info("Risc0 Solana Program Deployment Script started"); diff --git a/solana-verifier/scripts/estop.ts b/solana-verifier/scripts/estop.ts index a734629..6f11a11 100644 --- a/solana-verifier/scripts/estop.ts +++ b/solana-verifier/scripts/estop.ts @@ -1,4 +1,5 @@ import { + createLogger, createRpc, getRouterAddress, getTransactionSigner, @@ -8,10 +9,9 @@ const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); -import { Logger } from "tslog"; import { estopByOwner } from "./utils/estop"; -const logger = new Logger(); +const logger = createLogger(); async function collectUserInput(): Promise { console.log( diff --git a/solana-verifier/scripts/renounceOwnership.ts b/solana-verifier/scripts/renounceOwnership.ts index 91ef465..d8beb92 100644 --- a/solana-verifier/scripts/renounceOwnership.ts +++ b/solana-verifier/scripts/renounceOwnership.ts @@ -1,5 +1,5 @@ -import { Logger } from "tslog"; import { + createLogger, createRpc, getRouterAddress, getTransactionSigner, @@ -11,7 +11,7 @@ const rl = readline.createInterface({ output: process.stdout, }); -const logger = new Logger(); +const logger = createLogger(); async function ConfirmOperation() { console.log( diff --git a/solana-verifier/scripts/transferOwnership.ts b/solana-verifier/scripts/transferOwnership.ts index 51cc2e5..e1452aa 100644 --- a/solana-verifier/scripts/transferOwnership.ts +++ b/solana-verifier/scripts/transferOwnership.ts @@ -1,5 +1,5 @@ -import { Logger } from "tslog"; import { + createLogger, createRpc, getNewOwnerAddress, getRouterAddress, @@ -7,7 +7,7 @@ import { } from "./utils/utils"; import { transferOwnership } from "./utils/ownership"; -const logger = new Logger(); +const logger = createLogger(); async function runTransferOwnership() { logger.info("Verifier Router Ownership Transfer Script started"); diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts index 9bb9709..529a531 100644 --- a/solana-verifier/scripts/utils/addVerifier.ts +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -8,7 +8,6 @@ import { SolanaRpcSubscriptionsApi, TransactionSigner, } from "@solana/web3.js"; -import { Logger } from "tslog"; import { getTransactionSigner, createRpc, @@ -16,6 +15,7 @@ import { getRouterPda, getVerifierEntryPda, getProgramDataAddress, + createLogger, } from "./utils"; import { fetchVerifierEntry, @@ -27,7 +27,7 @@ import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, } from "../loaderV3"; -const logger = new Logger(); +const logger = createLogger(); export async function addVerifier( rpc: Rpc, diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts index a8a040a..d8c3bf9 100644 --- a/solana-verifier/scripts/utils/deploy.ts +++ b/solana-verifier/scripts/utils/deploy.ts @@ -1,6 +1,5 @@ import { promisify } from "util"; import process from "child_process"; -import { Logger } from "tslog"; import { verifiable, loadDefaultKeypair, diff --git a/solana-verifier/scripts/utils/estop.ts b/solana-verifier/scripts/utils/estop.ts index 010c972..668ff3c 100644 --- a/solana-verifier/scripts/utils/estop.ts +++ b/solana-verifier/scripts/utils/estop.ts @@ -7,8 +7,8 @@ import { TransactionSigner, } from "@solana/web3.js"; -import { Logger } from "tslog"; import { + createLogger, getProgramDataAddress, getRouterPda, getVerifierEntryPda, @@ -21,7 +21,7 @@ import { } from "../verify-router"; import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from "../loaderV3"; -const logger = new Logger(); +const logger = createLogger(); export async function estopByOwner( rpc: Rpc, diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts index b3a3b80..7b01c8d 100644 --- a/solana-verifier/scripts/utils/fireblocksSigner.ts +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -3,8 +3,13 @@ import { MessagePartialSigner, TransactionPartialSigner, } from "@solana/signers"; -import { getFireblocksCredentials, sleep, usingFireblocks } from "./utils"; -import { address } from "@solana/addresses"; +import { + createLogger, + getFireblocksCredentials, + sleep, + usingFireblocks, +} from "./utils"; +import { Address, address } from "@solana/addresses"; // import { ApiBaseUrl } from "solana_fireblocks_web3_provider/src/types"; // import { // FireblocksSDK, @@ -20,8 +25,11 @@ import { TransactionResponse, TransactionStateEnum, } from "@fireblocks/ts-sdk"; -import { getBase58Codec, getBase16Codec } from "@solana/web3.js"; -import { Logger } from "tslog"; +import { + getBase58Codec, + getBase16Codec, + SignatureBytes, +} from "@solana/web3.js"; import { PeerType } from "fireblocks-sdk"; export type FireBlocksSigner = @@ -32,7 +40,7 @@ export type FireBlocksSigner = export type FireblocksBaseUrl = "testnet" | "mainnet-beta" | "devnet"; -const logger = new Logger(); +const logger = createLogger(); export interface FireblocksConfig { apiSecret: string; @@ -128,11 +136,14 @@ export async function createSignerFromFireblocksConfig( const signedMessage = await waitForSignature(rawSigner.data); logger.trace(`Signed Message Completed:`); logger.trace(signedMessage); - return signedMessage.signedMessages.map((message) => - Object.freeze({ - [publicAddress]: getBase16Codec().encode(message.signature.fullSig), - }) - ); + return signedMessage.signedMessages.map((message) => { + const hexSig = message.signature.fullSig; + const readOnlyBytes = getBase16Codec().encode(hexSig); + const signatureBytes = new Uint8Array(readOnlyBytes) as SignatureBytes; + return Object.freeze({ + [publicAddress]: signatureBytes, + }); + }); }, signTransactions: async (transaction) => { logger.silly(`signTransactions called, Transactions: `); @@ -160,11 +171,14 @@ export async function createSignerFromFireblocksConfig( const signedTransaction = await waitForSignature(rawSigner.data); logger.trace(`Signed Transaction Completed:`); logger.trace(signedTransaction); - return signedTransaction.signedMessages.map((message) => - Object.freeze({ - [publicAddress]: getBase16Codec().encode(message.signature.fullSig), - }) - ); + return signedTransaction.signedMessages.map((message) => { + const hexSig = message.signature.fullSig; + const readOnlyBytes = getBase16Codec().encode(hexSig); + const signatureBytes = new Uint8Array(readOnlyBytes) as SignatureBytes; + return Object.freeze({ + [publicAddress]: signatureBytes, + }); + }); }, }; } diff --git a/solana-verifier/scripts/utils/init.ts b/solana-verifier/scripts/utils/init.ts index 40d858a..fa226e4 100644 --- a/solana-verifier/scripts/utils/init.ts +++ b/solana-verifier/scripts/utils/init.ts @@ -1,6 +1,5 @@ import { promisify } from "util"; import process from "child_process"; -import { Logger } from "tslog"; import { verifiable, loadDefaultKeypair, @@ -11,6 +10,7 @@ import { createRpc, getTransactionSigner, getRouterPda, + createLogger, } from "./utils"; import { address, @@ -32,7 +32,7 @@ export async function initilizeRouter( routerAddress: Address, owner: TransactionSigner ): Promise { - const log = new Logger(); + const log = createLogger(); log.info( `Initilizing the Verifier Router at address: ${routerAddress} with owner: ${owner.address}` diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts index c9dc291..e39f15c 100644 --- a/solana-verifier/scripts/utils/ownership.ts +++ b/solana-verifier/scripts/utils/ownership.ts @@ -6,7 +6,6 @@ import { Address, TransactionSigner, } from "@solana/web3.js"; -import { Logger } from "tslog"; import { fetchVerifierRouter, getAcceptOwnershipInstruction, @@ -14,9 +13,9 @@ import { getRenounceOwnershipInstruction, getTransferOwnershipInstruction, } from "../verify-router"; -import { getRouterPda, sendTransaction, sleep } from "./utils"; +import { createLogger, getRouterPda, sendTransaction, sleep } from "./utils"; -const logger = new Logger(); +const logger = createLogger(); export async function transferOwnership( rpc: Rpc, diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 0b3380a..1b1ebba 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -2,7 +2,6 @@ import fs from "fs"; import path from "path"; import os from "os"; import dotenv from "dotenv"; -import { Logger } from "tslog"; import { Rpc, @@ -38,6 +37,8 @@ import { getU32Codec, Lamports, lamports, + ITransactionMessageWithFeePayer, + TransactionMessageWithBlockhashLifetime, } from "@solana/web3.js"; import { getSetAuthorityInstruction, @@ -46,18 +47,54 @@ import { import { VERIFIER_ROUTER_PROGRAM_ADDRESS } from "../verify-router"; import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../groth16"; import Decimal from "decimal.js"; +import { Logger } from "tslog"; + +dotenv.config(); +const logger = createLogger(); + +export function createLogger() { + const logLevel = process.env.LOG_LEVEL || "info"; + let minLevel: number; + switch (logLevel.toLowerCase()) { + case "silly": + minLevel = 0; + break; + case "trace": + minLevel = 1; + break; + case "debug": + minLevel = 2; + break; + case "info": + minLevel = 3; + break; + case "warn": + minLevel = 4; + break; + case "error": + minLevel = 5; + break; + case "fatal": + minLevel = 6; + break; + default: + // INFO + minLevel = 3; + break; + } + const logger = new Logger({ + minLevel, + }); + return logger; +} + import { FireblocksConfig, - FireblocksCredentials, - FireblocksSolanaCluster, getFireblocksSigner, parseBasePath, } from "./fireblocksSigner"; import { FireblocksConnectionAdapterConfig } from "solana_fireblocks_web3_provider/src/types"; -dotenv.config(); -const logger = new Logger(); - export enum Programs { VerifierRouter = "verifier_router", Groth16Verifier = "groth_16_verifier", @@ -66,8 +103,12 @@ export enum Programs { export const LAMPORTS_PER_SOL = 1_000_000_000n; +type BlockhashTransaction = BaseTransactionMessage & + ITransactionMessageWithFeePayer & + TransactionMessageWithBlockhashLifetime; + export interface SendTransactionParams< - TTransaction extends BaseTransactionMessage + TTransaction extends BlockhashTransaction > { rpc: Rpc; rpcSubscriptions: RpcSubscriptions; @@ -77,7 +118,7 @@ export interface SendTransactionParams< } export async function sendTransaction< - TTransaction extends BaseTransactionMessage + TTransaction extends BlockhashTransaction >({ rpc, rpcSubscriptions, @@ -105,7 +146,7 @@ export async function sendTransaction< const transactionWithFeePayer = setTransactionMessageFeePayerSigner( feePayer, transactionWithBlockhash - ); + ) as TTransaction; const finalTransaction = appendTransactionMessageInstruction( instruction, transactionWithFeePayer @@ -334,21 +375,6 @@ export function usingFireblocks(): boolean { return getFireblocksCredentials() !== null; } -export function getSolanaCluster(): FireblocksSolanaCluster { - const cluster_env = process.env.SOLANA_CLUSTER.toLowerCase(); - switch (cluster_env) { - case "testnet": - case "mainnet-beta": - case "devnet": - return cluster_env; - default: - logger.warn( - "SOLANA_CLUSTER environment variable not set, defaulting to devnet." - ); - return "devnet"; - } -} - export async function getFireblocksCredentials(): Promise { const apiSecretPath = process.env.FIREBLOCKS_PRIVATE_KEY_PATH; const apiKey = process.env.FIREBLOCKS_API_KEY; diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index 5634482..717bcfb 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -54,6 +54,7 @@ import { BaseTransactionMessage, SolanaError, SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, + lamports, } from "@solana/web3.js"; import { use as chaiUse, expect } from "chai"; @@ -195,14 +196,14 @@ describe("verifier-router", () => { // Airdrop SOL to owner for transactions await requestAirdrop({ - lamports: 2n * LAMPORTS_PER_SOL, + lamports: lamports(2n * LAMPORTS_PER_SOL), recipientAddress: owner.address, commitment: "confirmed", }); // Airdrop SOL to owner for transactions await requestAirdrop({ - lamports: 2n * LAMPORTS_PER_SOL, + lamports: lamports(2n * LAMPORTS_PER_SOL), recipientAddress: notOwner.address, commitment: "confirmed", }); diff --git a/solana-verifier/tsconfig.json b/solana-verifier/tsconfig.json index 0afbfc2..61200f2 100644 --- a/solana-verifier/tsconfig.json +++ b/solana-verifier/tsconfig.json @@ -4,7 +4,7 @@ "typeRoots": ["./node_modules/@types"], "lib": ["es2020"], "module": "commonjs", - "target": "es6", + "target": "es2020", "esModuleInterop": true, "resolveJsonModule": true } diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index a0f2c6c..10d4a27 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -160,6 +160,66 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/config-array@^0.19.0": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.1.tgz#734aaea2c40be22bbb1f2a9dac687c57a6a4c984" + integrity sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA== + dependencies: + "@eslint/object-schema" "^2.1.5" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.1.tgz#31763847308ef6b7084a4505573ac9402c51f9d1" + integrity sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.17.0", "@eslint/js@^9.17.0": + version "9.17.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.17.0.tgz#1523e586791f80376a6f8398a3964455ecc651ec" + integrity sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w== + +"@eslint/object-schema@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.5.tgz#8670a8f6258a2be5b2c620ff314a1d984c23eb2e" + integrity sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz#2b78e7bb3755784bb13faa8932a1d994d6537792" + integrity sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg== + dependencies: + levn "^0.4.1" + "@ethersproject/bytes@5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" @@ -182,6 +242,34 @@ platform "1.3.6" uuid "8.3.2" +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== + dependencies: + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -221,6 +309,27 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@notabene/pii-sdk@^1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@notabene/pii-sdk/-/pii-sdk-1.17.1.tgz#36fcf88589e42bf816354daeba52a8fb904c7a87" @@ -853,6 +962,16 @@ resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" @@ -901,6 +1020,87 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz#c78e363ab5fe3b21dd1c90d8be9581534417f78e" + integrity sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.18.2" + "@typescript-eslint/type-utils" "8.18.2" + "@typescript-eslint/utils" "8.18.2" + "@typescript-eslint/visitor-keys" "8.18.2" + graphemer "^1.4.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.2.tgz#0379a2e881d51d8fcf7ebdfa0dd18eee79182ce2" + integrity sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA== + dependencies: + "@typescript-eslint/scope-manager" "8.18.2" + "@typescript-eslint/types" "8.18.2" + "@typescript-eslint/typescript-estree" "8.18.2" + "@typescript-eslint/visitor-keys" "8.18.2" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz#d193c200d61eb0ddec5987c8e48c9d4e1c0510bd" + integrity sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g== + dependencies: + "@typescript-eslint/types" "8.18.2" + "@typescript-eslint/visitor-keys" "8.18.2" + +"@typescript-eslint/type-utils@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz#5ad07e09002eee237591881df674c1c0c91ca52f" + integrity sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA== + dependencies: + "@typescript-eslint/typescript-estree" "8.18.2" + "@typescript-eslint/utils" "8.18.2" + debug "^4.3.4" + ts-api-utils "^1.3.0" + +"@typescript-eslint/types@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.2.tgz#5ebad5b384c8aa1c0f86cee1c61bcdbe7511f547" + integrity sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ== + +"@typescript-eslint/typescript-estree@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz#fffb85527f8304e29bfbbdc712f4515da9f8b47c" + integrity sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg== + dependencies: + "@typescript-eslint/types" "8.18.2" + "@typescript-eslint/visitor-keys" "8.18.2" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.2.tgz#a2635f71904a84f9e47fe1b6f65a6d944ff1adf9" + integrity sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.18.2" + "@typescript-eslint/types" "8.18.2" + "@typescript-eslint/typescript-estree" "8.18.2" + +"@typescript-eslint/visitor-keys@8.18.2": + version "8.18.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz#b3e434b701f086b10a7c82416ebc56899d27ef2f" + integrity sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw== + dependencies: + "@typescript-eslint/types" "8.18.2" + eslint-visitor-keys "^4.2.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" @@ -919,6 +1119,16 @@ a-sync-waterfall@^1.0.0: resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" @@ -926,6 +1136,16 @@ agentkeepalive@^4.5.0: dependencies: humanize-ms "^1.2.1" +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" @@ -1072,7 +1292,14 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@~3.0.2: +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3, braces@~3.0.2: version "3.0.3" resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== @@ -1155,6 +1382,11 @@ call-bound@^1.0.2: call-bind-apply-helpers "^1.0.1" get-intrinsic "^1.2.6" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + camelcase@^6.0.0, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" @@ -1185,7 +1417,7 @@ chai@^4.3.4: pathval "^1.1.1" type-detect "^4.1.0" -chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1285,6 +1517,15 @@ cross-fetch@^3.1.5: dependencies: node-fetch "^2.6.12" +cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-hash@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" @@ -1302,7 +1543,7 @@ debug@4.3.3: dependencies: ms "2.1.2" -debug@^4.3.4: +debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.4.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== @@ -1339,6 +1580,11 @@ deep-equal-in-any-order@^2.0.6: lodash.mapvalues "^4.6.0" sort-any "^2.0.0" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -1463,11 +1709,102 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@4.0.0: +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@^9.17.0: + version "9.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.17.0.tgz#faa1facb5dd042172fdc520106984b5c2421bb0c" + integrity sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.17.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.6" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + json-stable-stringify-without-jsonify "^1.0.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" + +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" @@ -1483,11 +1820,44 @@ eyes@^0.1.8: resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fast-stable-stringify@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== +fastq@^1.6.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.18.0.tgz#d631d7e25faffea81887fe5ea8c9010e1b36fee0" + integrity sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw== + dependencies: + reusify "^1.0.4" + fetch-blob@^3.1.2, fetch-blob@^3.1.4: version "3.2.0" resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" @@ -1496,6 +1866,13 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4: node-domexception "^1.0.0" web-streams-polyfill "^3.0.3" +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" @@ -1513,7 +1890,7 @@ filter-obj@^1.1.0: resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -find-up@5.0.0: +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -1534,11 +1911,24 @@ fireblocks-sdk@^5.35.0: query-string "^7.1.3" uuid "^8.3.2" +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + flat@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +flatted@^3.2.9: + version "3.3.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27" + integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== + follow-redirects@^1.15.6: version "1.15.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" @@ -1612,13 +2002,20 @@ get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: hasown "^2.0.2" math-intrinsics "^1.0.0" -glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" @@ -1631,6 +2028,11 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -1643,6 +2045,11 @@ gopd@^1.2.0: resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + growl@1.10.5: version "1.10.5" resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" @@ -1699,6 +2106,24 @@ ieee754@^1.2.1: resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@^5.2.0, ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" @@ -1729,7 +2154,7 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -1784,13 +2209,28 @@ jayson@^4.1.1: uuid "^8.3.2" ws "^7.5.10" -js-yaml@4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json-stable-stringify@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" @@ -1872,6 +2312,21 @@ jws@^3.2.2: jwa "^1.4.1" safe-buffer "^5.0.1" +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + locate-path@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" @@ -1919,6 +2374,11 @@ lodash.mapvalues@^4.6.0: resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -1961,6 +2421,19 @@ math-intrinsics@^1.0.0: resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -1980,13 +2453,20 @@ minimatch@4.2.1: dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -2064,6 +2544,11 @@ nanoid@3.3.1: resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + no-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" @@ -2129,6 +2614,18 @@ once@^1.3.0: dependencies: wrappy "1" +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" @@ -2148,6 +2645,13 @@ pako@^2.0.3: resolved "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz" integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" @@ -2158,12 +2662,17 @@ path-is-absolute@^1.0.0: resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -picomatch@^2.0.4, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -2173,6 +2682,11 @@ platform@1.3.6, platform@^1.3.6: resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prettier@^2.6.2: version "2.8.8" resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" @@ -2188,6 +2702,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + qs@^6.10.1, qs@^6.11.0: version "6.13.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" @@ -2205,6 +2724,11 @@ query-string@^7.1.3: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" @@ -2229,6 +2753,16 @@ require-directory@^2.1.1: resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rpc-websockets@^9.0.2: version "9.0.4" resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz" @@ -2245,6 +2779,13 @@ rpc-websockets@^9.0.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + safe-buffer@^5.0.1, safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" @@ -2255,7 +2796,7 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^7.5.4: +semver@^7.5.4, semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -2279,6 +2820,18 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + side-channel-list@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" @@ -2423,7 +2976,7 @@ strip-bom@^3.0.0: resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -2479,6 +3032,11 @@ tr46@~0.0.3: resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-api-utils@^1.3.0: + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== + ts-mocha@^10.0.0: version "10.0.0" resolved "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz" @@ -2527,15 +3085,31 @@ tslog@^4.9.3: resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.9.3.tgz#d4167d5f51748bdeab593945bc2d8f9827ea0dba" integrity sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-detect@^4.0.0, type-detect@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== -typescript@^4.3.5: - version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript-eslint@^8.18.2: + version "8.18.2" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.18.2.tgz#71334dcf843adc3fbb771dce5ade7876aa0d62b7" + integrity sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ== + dependencies: + "@typescript-eslint/eslint-plugin" "8.18.2" + "@typescript-eslint/parser" "8.18.2" + "@typescript-eslint/utils" "8.18.2" + +typescript@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== uint8arrays@3.1.1, uint8arrays@^3.0.0: version "3.1.1" @@ -2559,6 +3133,13 @@ undici-types@~6.20.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + utf-8-validate@^5.0.2: version "5.0.10" resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" @@ -2599,13 +3180,18 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + workerpool@6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz" From e277ccaaf5c4d0658fd527e8c5588b3801649746 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Tue, 24 Dec 2024 05:55:33 -0700 Subject: [PATCH 09/21] Cleaned up the scripts and fixed typos --- solana-verifier/.eslintignore.swp | Bin 0 -> 4096 bytes solana-verifier/eslint.config.mjs | 101 + solana-verifier/idl/groth_16_verifier.json | 61 +- solana-verifier/idl/test_bad_verifier.json | 61 +- solana-verifier/idl/verifier_router.json | 313 +- solana-verifier/package-lock.json | 5941 +++++++++++++---- solana-verifier/package.json | 12 +- .../test/data/r0_test_vk.json | 17 +- .../groth_16_verifier/test/data/receipt.json | 61 +- solana-verifier/scripts/acceptOwnership.ts | 1 - solana-verifier/scripts/addVerifier.ts | 6 +- solana-verifier/scripts/codma.ts | 2 +- solana-verifier/scripts/deploy.ts | 11 +- solana-verifier/scripts/estop.ts | 4 +- solana-verifier/scripts/renounceOwnership.ts | 4 +- solana-verifier/scripts/transferOwnership.ts | 2 +- solana-verifier/scripts/utils/addVerifier.ts | 23 +- solana-verifier/scripts/utils/deploy.ts | 12 +- solana-verifier/scripts/utils/estop.ts | 10 +- .../scripts/utils/fireblocksSigner.ts | 16 +- solana-verifier/scripts/utils/init.ts | 27 +- solana-verifier/scripts/utils/ownership.ts | 6 +- solana-verifier/scripts/utils/utils.ts | 35 +- solana-verifier/tests/router-verifier.ts | 49 +- solana-verifier/yarn.lock | 1548 +++-- 25 files changed, 5804 insertions(+), 2519 deletions(-) create mode 100644 solana-verifier/.eslintignore.swp create mode 100644 solana-verifier/eslint.config.mjs diff --git a/solana-verifier/.eslintignore.swp b/solana-verifier/.eslintignore.swp new file mode 100644 index 0000000000000000000000000000000000000000..3987a4cdcbb86cbaccceefac0ac05ec97c99f53e GIT binary patch literal 4096 zcmYc?2=nw+u+%eT00IF9hIuQq(jU8pG3!T)F(efw=B4E4fn@LkCx|-Tko@x0BHfVk zd>pFlpa$xf=NDxc7bGU9>KA1eCmZPJWR^jhy2bf9iFt|o5K6Z!wJ0+!Gqp%xFSR%) zGp{5wJukl~6^HSo!lNND8UnaNptK}S*Mc|H*vQZTq(oUsQ9)QJ6qo8z@zD?%4S~@R Z7!85Z5Eu=C(GVC7fzc2c4S``80svE)FIWHo literal 0 HcmV?d00001 diff --git a/solana-verifier/eslint.config.mjs b/solana-verifier/eslint.config.mjs new file mode 100644 index 0000000..c8502c2 --- /dev/null +++ b/solana-verifier/eslint.config.mjs @@ -0,0 +1,101 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import unusedImports from "eslint-plugin-unused-imports"; +import spellcheck from "eslint-plugin-spellcheck"; +import tsParser from "@typescript-eslint/parser"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +export default [ + ...compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ), + { + plugins: { + "@typescript-eslint": typescriptEslint, + "unused-imports": unusedImports, + spellcheck, + }, + + ignores: [ + "scripts/bad-verifier", + "scripts/groth16", + "loaderV3", + "loaderV4", + "verify-router", + ], + languageOptions: { + parser: tsParser, + ecmaVersion: 2020, + sourceType: "module", + + parserOptions: { + project: ["./tsconfig.json"], + }, + }, + + rules: { + "unused-imports/no-unused-imports": "error", + + "unused-imports/no-unused-vars": [ + "warn", + { + vars: "all", + varsIgnorePattern: "^_", + args: "after-used", + argsIgnorePattern: "^_", + }, + ], + + "spellcheck/spell-checker": [ + "warn", + { + skipWords: [ + "nestjs", + "axios", + "typeorm", + "lodash", + "verifier", + "rpc", + "estop", + "upgradable", + "groth", + "bpf", + "localhost", + "pda", + "uint8", + "lamports", + "solana", + "keypair", + "codec", + "chai", + "deployer", + "pubkey", + "verifiers", + "struct", + "idl", + "ownable", + "utf8", + "readonly", + "metas", + ], + skipIfMatch: ["http://[^s]*", "^\\/\\/.*"], + minLength: 3, + }, + ], + + "no-console": "warn", + "@typescript-eslint/explicit-function-return-type": "off", + }, + }, +]; diff --git a/solana-verifier/idl/groth_16_verifier.json b/solana-verifier/idl/groth_16_verifier.json index 89531ce..38e4ff3 100644 --- a/solana-verifier/idl/groth_16_verifier.json +++ b/solana-verifier/idl/groth_16_verifier.json @@ -9,16 +9,7 @@ "instructions": [ { "name": "verify", - "discriminator": [ - 133, - 161, - 141, - 48, - 120, - 198, - 88, - 150 - ], + "discriminator": [133, 161, 141, 48, 120, 198, 88, 150], "accounts": [ { "name": "system_program", @@ -37,19 +28,13 @@ { "name": "image_id", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "journal_digest", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -104,28 +89,19 @@ { "name": "pi_a", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "pi_b", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "pi_c", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } ] @@ -143,47 +119,32 @@ { "name": "vk_alpha_g1", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "vk_beta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_gamma_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_delta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_ic", "type": { "vec": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } } diff --git a/solana-verifier/idl/test_bad_verifier.json b/solana-verifier/idl/test_bad_verifier.json index f05a4d2..65cd718 100644 --- a/solana-verifier/idl/test_bad_verifier.json +++ b/solana-verifier/idl/test_bad_verifier.json @@ -22,16 +22,7 @@ "", "All other proofs will be rejected by this verifier." ], - "discriminator": [ - 133, - 161, - 141, - 48, - 120, - 198, - 88, - 150 - ], + "discriminator": [133, 161, 141, 48, 120, 198, 88, 150], "accounts": [ { "name": "system_program", @@ -50,19 +41,13 @@ { "name": "image_id", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "journal_digest", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -92,28 +77,19 @@ { "name": "pi_a", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "pi_b", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "pi_c", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } ] @@ -131,47 +107,32 @@ { "name": "vk_alpha_g1", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "vk_beta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_gamma_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_delta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_ic", "type": { "vec": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } } diff --git a/solana-verifier/idl/verifier_router.json b/solana-verifier/idl/verifier_router.json index 83bc5dc..e13d3f6 100644 --- a/solana-verifier/idl/verifier_router.json +++ b/solana-verifier/idl/verifier_router.json @@ -9,16 +9,7 @@ "instructions": [ { "name": "accept_ownership", - "discriminator": [ - 172, - 23, - 43, - 13, - 238, - 213, - 85, - 150 - ], + "discriminator": [172, 23, 43, 13, 238, 213, 85, 150], "accounts": [ { "name": "state", @@ -34,16 +25,7 @@ }, { "name": "add_verifier", - "discriminator": [ - 165, - 72, - 135, - 225, - 67, - 181, - 255, - 135 - ], + "discriminator": [165, 72, 135, 225, 67, 181, 255, 135], "accounts": [ { "name": "router", @@ -52,14 +34,7 @@ "seeds": [ { "kind": "const", - "value": [ - 114, - 111, - 117, - 116, - 101, - 114 - ] + "value": [114, 111, 117, 116, 101, 114] } ] } @@ -71,16 +46,7 @@ "seeds": [ { "kind": "const", - "value": [ - 118, - 101, - 114, - 105, - 102, - 105, - 101, - 114 - ] + "value": [118, 101, 114, 105, 102, 105, 101, 114] }, { "kind": "account", @@ -123,16 +89,7 @@ }, { "name": "cancel_transfer", - "discriminator": [ - 50, - 32, - 70, - 130, - 142, - 41, - 111, - 175 - ], + "discriminator": [50, 32, 70, 130, 142, 41, 111, 175], "accounts": [ { "name": "state", @@ -148,16 +105,7 @@ }, { "name": "emergency_stop", - "discriminator": [ - 179, - 143, - 200, - 137, - 108, - 245, - 248, - 35 - ], + "discriminator": [179, 143, 200, 137, 108, 245, 248, 35], "accounts": [ { "name": "router", @@ -169,38 +117,20 @@ "seeds": [ { "kind": "const", - "value": [ - 114, - 111, - 117, - 116, - 101, - 114 - ] + "value": [114, 111, 117, 116, 101, 114] } ] } }, { "name": "verifier_entry", - "docs": [ - "The verifier entry to be closed" - ], + "docs": ["The verifier entry to be closed"], "writable": true, "pda": { "seeds": [ { "kind": "const", - "value": [ - 118, - 101, - 114, - 105, - 102, - 105, - 101, - 114 - ] + "value": [118, 101, 114, 105, 102, 105, 101, 114] }, { "kind": "account", @@ -230,9 +160,7 @@ }, { "name": "authority", - "docs": [ - "The authority attempting the emergency stop" - ], + "docs": ["The authority attempting the emergency stop"], "writable": true, "signer": true }, @@ -250,16 +178,7 @@ }, { "name": "emergency_stop_with_proof", - "discriminator": [ - 54, - 84, - 135, - 9, - 249, - 7, - 161, - 4 - ], + "discriminator": [54, 84, 135, 9, 249, 7, 161, 4], "accounts": [ { "name": "router", @@ -271,38 +190,20 @@ "seeds": [ { "kind": "const", - "value": [ - 114, - 111, - 117, - 116, - 101, - 114 - ] + "value": [114, 111, 117, 116, 101, 114] } ] } }, { "name": "verifier_entry", - "docs": [ - "The verifier entry to be closed" - ], + "docs": ["The verifier entry to be closed"], "writable": true, "pda": { "seeds": [ { "kind": "const", - "value": [ - 118, - 101, - 114, - 105, - 102, - 105, - 101, - 114 - ] + "value": [118, 101, 114, 105, 102, 105, 101, 114] }, { "kind": "account", @@ -317,9 +218,7 @@ }, { "name": "authority", - "docs": [ - "The authority attempting the emergency stop" - ], + "docs": ["The authority attempting the emergency stop"], "writable": true, "signer": true }, @@ -355,19 +254,13 @@ { "name": "image_id", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "journal_digest", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -382,16 +275,7 @@ }, { "name": "initialize", - "discriminator": [ - 175, - 175, - 109, - 31, - 13, - 152, - 155, - 237 - ], + "discriminator": [175, 175, 109, 31, 13, 152, 155, 237], "accounts": [ { "name": "router", @@ -404,31 +288,20 @@ "seeds": [ { "kind": "const", - "value": [ - 114, - 111, - 117, - 116, - 101, - 114 - ] + "value": [114, 111, 117, 116, 101, 114] } ] } }, { "name": "authority", - "docs": [ - "The authority initializing and paying for the router" - ], + "docs": ["The authority initializing and paying for the router"], "writable": true, "signer": true }, { "name": "system_program", - "docs": [ - "Required for account initialization" - ], + "docs": ["Required for account initialization"], "address": "11111111111111111111111111111111" } ], @@ -436,16 +309,7 @@ }, { "name": "renounce_ownership", - "discriminator": [ - 19, - 143, - 91, - 79, - 34, - 168, - 174, - 125 - ], + "discriminator": [19, 143, 91, 79, 34, 168, 174, 125], "accounts": [ { "name": "state", @@ -461,16 +325,7 @@ }, { "name": "transfer_ownership", - "discriminator": [ - 65, - 177, - 215, - 73, - 53, - 45, - 99, - 47 - ], + "discriminator": [65, 177, 215, 73, 53, 45, 99, 47], "accounts": [ { "name": "state", @@ -491,34 +346,16 @@ }, { "name": "verify", - "discriminator": [ - 133, - 161, - 141, - 48, - 120, - 198, - 88, - 150 - ], + "discriminator": [133, 161, 141, 48, 120, 198, 88, 150], "accounts": [ { "name": "router", - "docs": [ - "The router account containing the verifier registry" - ], + "docs": ["The router account containing the verifier registry"], "pda": { "seeds": [ { "kind": "const", - "value": [ - 114, - 111, - 117, - 116, - 101, - 114 - ] + "value": [114, 111, 117, 116, 101, 114] } ] } @@ -533,16 +370,7 @@ "seeds": [ { "kind": "const", - "value": [ - 118, - 101, - 114, - 105, - 102, - 105, - 101, - 114 - ] + "value": [118, 101, 114, 105, 102, 105, 101, 114] }, { "kind": "account", @@ -580,19 +408,13 @@ { "name": "image_id", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "journal_digest", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -609,44 +431,17 @@ "accounts": [ { "name": "VerifierEntry", - "discriminator": [ - 102, - 247, - 148, - 158, - 33, - 153, - 100, - 93 - ] + "discriminator": [102, 247, 148, 158, 33, 153, 100, 93] }, { "name": "VerifierRouter", - "discriminator": [ - 188, - 46, - 30, - 54, - 25, - 63, - 197, - 26 - ] + "discriminator": [188, 46, 30, 54, 25, 63, 197, 26] } ], "events": [ { "name": "EmergencyStopEvent", - "discriminator": [ - 44, - 170, - 247, - 63, - 91, - 138, - 146, - 110 - ] + "discriminator": [44, 170, 247, 63, 91, 138, 146, 110] } ], "errors": [ @@ -747,9 +542,7 @@ "fields": [ { "name": "owner", - "docs": [ - "The current owner's public key" - ], + "docs": ["The current owner's public key"], "type": { "option": "pubkey" } @@ -774,28 +567,19 @@ { "name": "pi_a", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "pi_b", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "pi_c", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } ] @@ -813,47 +597,32 @@ { "name": "vk_alpha_g1", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { "name": "vk_beta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_gamma_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_delta_g2", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "vk_ic", "type": { "vec": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } } } diff --git a/solana-verifier/package-lock.json b/solana-verifier/package-lock.json index ec7debb..f2cbcdc 100644 --- a/solana-verifier/package-lock.json +++ b/solana-verifier/package-lock.json @@ -6,19 +6,39 @@ "": { "license": "ISC", "dependencies": { + "@codama/nodes-from-anchor": "^1.0.1", + "@codama/renderers": "^1.0.4", "@coral-xyz/anchor": "^0.30.1", - "@solana/web3.js": "^1.95.5", - "solana-program": "^0.3.6" + "@eslint/js": "^9.17.0", + "@fireblocks/ts-sdk": "^6.0.0", + "@solana/web3.js": "^2.0.0-rc.4", + "@types/chai-as-promised": "^7.1.2", + "@types/node": "^22.10.0", + "chai-as-promised": "^7.1.2", + "codama": "^1.1.0", + "decimal.js": "^10.4.3", + "deep-equal-in-any-order": "^2.0.6", + "dotenv": "^16.4.7", + "fireblocks-sdk": "^5.35.0", + "solana_fireblocks_web3_provider": "https://github.com/fireblocks/solana-web3-adapter.git", + "solana-bankrun": "^0.4.0", + "tslog": "^4.9.3", + "typescript-eslint": "^8.18.2" }, "devDependencies": { "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^8.18.2", + "@typescript-eslint/parser": "^8.18.2", "chai": "^4.3.4", + "eslint": "^9.17.0", + "eslint-plugin-spellcheck": "^0.0.20", + "eslint-plugin-unused-imports": "^4.1.4", "mocha": "^9.0.3", - "prettier": "^2.6.2", + "prettier": "^3.4.2", "ts-mocha": "^10.0.0", - "typescript": "^4.3.5" + "typescript": "^5.7.2" } }, "node_modules/@babel/runtime": { @@ -33,6 +53,161 @@ "node": ">=6.9.0" } }, + "node_modules/@codama/errors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/errors/-/errors-1.1.0.tgz", + "integrity": "sha512-njLWTPYgz5uJP02617CX0BZCHGHrHnQvKroU0z4YcJZiaMQlw3VLzb+e2ZU2X+uVpp+3ITJZ9yexuoEhJBVQdQ==", + "license": "MIT", + "dependencies": { + "@codama/node-types": "1.1.0", + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" + } + }, + "node_modules/@codama/errors/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@codama/node-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/node-types/-/node-types-1.1.0.tgz", + "integrity": "sha512-+J6E0didCY0+8dr2vI6ag+FMaMr3SemvXJYKOhxKEJ6HXR/J+7cddpptXyrIhLa8R2Kw0yzIG9VjAlUGL7u8OQ==", + "license": "MIT" + }, + "node_modules/@codama/nodes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/nodes/-/nodes-1.1.0.tgz", + "integrity": "sha512-a6lX45CqfvdU5jKx63zWVEUbyAjEKqjye3EkboKNEJIM0RDmDwtTqNuQBR8HHx9nO7EBPypxYOXtGpmVXg0xYw==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/node-types": "1.1.0" + } + }, + "node_modules/@codama/nodes-from-anchor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz", + "integrity": "sha512-9sITAJyWxjbuBqeSmiA/AzN15+65KvycPJmc0ReWWsbqBCblr0A5jeA/zFbfILRFcu6MVyJXpQvl42FZ/vAL1g==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/visitors": "1.1.0", + "@noble/hashes": "^1.5.0" + } + }, + "node_modules/@codama/renderers": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@codama/renderers/-/renderers-1.0.4.tgz", + "integrity": "sha512-4M1RGHFOoaZrbABiFREtcL3pEITxnOlVJIeMwzWY5wDE+v8C1eT6LLP6GjjljZY9FmJXrRSzTJsXbWwBzYLhKw==", + "license": "MIT", + "dependencies": { + "@codama/renderers-js": "1.1.0", + "@codama/renderers-js-umi": "1.1.0", + "@codama/renderers-rust": "1.0.4" + } + }, + "node_modules/@codama/renderers-core": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@codama/renderers-core/-/renderers-core-1.0.1.tgz", + "integrity": "sha512-EOOQx2s5t6huVJRXwwLC6adyqSuDPVKIWXiDhy5uyJBRlNk18/vb4OmVoXTIWb6mS64m/j0DuyrWJWzIUUJ84w==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/visitors-core": "1.1.0" + } + }, + "node_modules/@codama/renderers-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/renderers-js/-/renderers-js-1.1.0.tgz", + "integrity": "sha512-LeFLDlKb726q6VARnuKCQ0qV2c0xS6s7U1jF7WrecMj3zrWy5hN1yGKKEZdItq95M0JOawbHbejjP9aiJ4R7Kw==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/nodes-from-anchor": "1.0.1", + "@codama/renderers-core": "1.0.1", + "@codama/visitors-core": "1.1.0", + "@solana/codecs-strings": "rc", + "nunjucks": "^3.2.4", + "prettier": "^3.3.3" + } + }, + "node_modules/@codama/renderers-js-umi": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/renderers-js-umi/-/renderers-js-umi-1.1.0.tgz", + "integrity": "sha512-PxHuvRlqD2jwK3QtK/eKGZ8QmRx8htcSEM8ylZWwsgs4Wtd7LZgEZezwrzTpSgGPcH3PWoYyBRfER8Q3XwrcDA==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/renderers-core": "1.0.1", + "@codama/validators": "1.1.0", + "@codama/visitors-core": "1.1.0", + "@solana/codecs-strings": "rc", + "nunjucks": "^3.2.4", + "prettier": "^3.3.3" + } + }, + "node_modules/@codama/renderers-rust": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@codama/renderers-rust/-/renderers-rust-1.0.4.tgz", + "integrity": "sha512-+THq6bCInn30dKEGGNrilnbaitA8A3pOjfsqwka/i3Aip5x5At6lk7VcQwoWzDvvcy/2FHaOVi3hmlc28d8maw==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/renderers-core": "1.0.1", + "@codama/visitors-core": "1.1.0", + "@solana/codecs-strings": "rc", + "nunjucks": "^3.2.4" + } + }, + "node_modules/@codama/validators": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/validators/-/validators-1.1.0.tgz", + "integrity": "sha512-TVzTjN2m1bGauLnqJE12lZfZf1L2C9Hal7/i0sjNmtc3UbUL7pIH5Rp4bFSyfDuyhMD0JfxtJqr3YlK6yXoqkA==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/visitors-core": "1.1.0" + } + }, + "node_modules/@codama/visitors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/visitors/-/visitors-1.1.0.tgz", + "integrity": "sha512-QpAShuxemS8oplHDXNqnUnYwhJq58RZjfZ/KMIpdm88OCBnQRO4YfM/zQLEvXjA+tpwJpe4WnL6opTLLnSYThw==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/visitors-core": "1.1.0" + } + }, + "node_modules/@codama/visitors-core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@codama/visitors-core/-/visitors-core-1.1.0.tgz", + "integrity": "sha512-NBJAgGmVdFIWHDsKSKjTYbIfSZRyRzgqPzmHFgRIRjy4Uw63zOwP5Yk1bctWrP6YRlGjrTunfVkOIA6QiVr6lg==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "json-stable-stringify": "^1.1.1" + } + }, "node_modules/@coral-xyz/anchor": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz", @@ -68,7 +243,7 @@ "node": ">=10" } }, - "node_modules/@coral-xyz/borsh": { + "node_modules/@coral-xyz/anchor/node_modules/@coral-xyz/borsh": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz", "integrity": "sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ==", @@ -84,49 +259,10 @@ "@solana/web3.js": "^1.68.0" } }, - "node_modules/@noble/curves": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", - "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.5.0" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", - "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@solana/buffer-layout": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", - "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", - "license": "MIT", - "dependencies": { - "buffer": "~6.0.3" - }, - "engines": { - "node": ">=5.10" - } - }, - "node_modules/@solana/web3.js": { - "version": "1.95.5", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz", - "integrity": "sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg==", + "node_modules/@coral-xyz/anchor/node_modules/@solana/web3.js": { + "version": "1.98.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz", + "integrity": "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.25.0", @@ -146,7 +282,7 @@ "superstruct": "^2.0.2" } }, - "node_modules/@solana/web3.js/node_modules/superstruct": { + "node_modules/@coral-xyz/anchor/node_modules/@solana/web3.js/node_modules/superstruct": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", @@ -155,1141 +291,3789 @@ "node": ">=14.0.0" } }, - "node_modules/@swc/helpers": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", - "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/bn.js": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", - "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/chai": { - "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.8.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", - "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", - "license": "MIT" - }, - "node_modules/@types/ws": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", - "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "license": "MIT", - "dependencies": { - "@types/node": "*" + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/agentkeepalive": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", - "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", - "license": "MIT", + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "license": "Apache-2.0", "dependencies": { - "humanize-ms": "^1.2.1" + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": ">= 8.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "license": "MIT", + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "node_modules/@eslint/eslintrc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://opencollective.com/eslint" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "license": "ISC", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 8" + "node": "*" } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, + "node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "license": "MIT", + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "license": "Apache-2.0", "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/b58": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/b58/-/b58-4.0.3.tgz", - "integrity": "sha512-VDtdiomm0ywbL8YzgevOZ9pcx6LuOZ3d9qYTPDcYUPf7dRYNA8wvK6epYy0FKMWIM5uaDwd3kWt1x+1S9scB1Q==", - "license": "MIT", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "license": "Apache-2.0", "dependencies": { - "base-x": "^3.0.2" + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/base-x": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", - "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "safe-buffer": "^5.0.1" + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", "funding": [ { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, { - "type": "consulting", - "url": "https://feross.org/support" + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } ], "license": "MIT" }, - "node_modules/bigint-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", - "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", - "hasInstallScript": true, + "node_modules/@fireblocks/ts-sdk": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fireblocks/ts-sdk/-/ts-sdk-6.0.0.tgz", + "integrity": "sha512-LB4XKc5B7Lr3wjQG9VKjWj2BW5tmIwA83xG2fI7breawNcrWOP8ck60OfESA0ePaSlBXk342ZE/tHX57leJC2g==", + "license": "MIT License", + "dependencies": { + "axios": "^1.6.7", + "jsonwebtoken": "8.5.1", + "platform": "1.3.6", + "uuid": "8.3.2" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "license": "Apache-2.0", "dependencies": { - "bindings": "^1.3.0" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=18.18.0" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "license": "Apache-2.0", "engines": { - "node": ">=8" + "node": ">=18.18" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@multiformats/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==", "license": "MIT" }, - "node_modules/borsh": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", - "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", - "license": "Apache-2.0", - "dependencies": { - "bn.js": "^5.2.0", - "bs58": "^4.0.0", - "text-encoding-utf-8": "^1.0.2" + "node_modules/@noble/ciphers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz", + "integrity": "sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "node_modules/@noble/curves": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz", + "integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@noble/hashes": "1.6.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, + "node_modules/@noble/hashes": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", + "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "license": "MIT", "dependencies": { - "base-x": "^3.0.2" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "node_modules/@notabene/pii-sdk": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@notabene/pii-sdk/-/pii-sdk-1.17.1.tgz", + "integrity": "sha512-lCDPl58SQBAEihDIHtkghVH7fNOtdngDM9DJrDW+odEKAnB0+o6r5V+AeiNYIfRwkn8nXiCW7i3SsNMmLlj5Zw==", "license": "MIT", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "@ethersproject/bytes": "5.7.0", + "@noble/curves": "^1.1.0", + "@stablelib/ed25519": "1.0.3", + "axios": "^1.6.0", + "axios-oauth-client": "^1.5.0", + "axios-token-interceptor": "^0.2.0", + "base64url": "3.0.1", + "bs58": "5.0.0", + "debug": "^4.3.4", + "did-jwt": "^7.0", + "dotenv": "^16.0.3", + "lodash": "^4.17.21", + "multibase": "4.0.6", + "multicodec": "3.2.1", + "node-fetch": "^3.3.1", + "tslib": "^2.5.0", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, + "node_modules/@notabene/pii-sdk/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", "license": "MIT" }, - "node_modules/buffer-layout": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", - "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "node_modules/@notabene/pii-sdk/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", "license": "MIT", - "engines": { - "node": ">=4.5" + "dependencies": { + "base-x": "^4.0.0" } }, - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, + "node_modules/@notabene/pii-sdk/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", - "optional": true, "dependencies": { - "node-gyp-build": "^4.3.0" + "ms": "^2.1.3" }, "engines": { - "node": ">=6.14.2" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "node_modules/@notabene/pii-sdk/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dev": true, + "node_modules/@notabene/pii-sdk/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - }, - "engines": { - "node": ">=4" + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "node_modules/@scure/base": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", + "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/accounts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/accounts/-/accounts-2.0.0.tgz", + "integrity": "sha512-1CE4P3QSDH5x+ZtSthMY2mn/ekROBnlT3/4f3CHDJicDvLQsgAq2yCvGHsYkK3ZA0mxhFLuhJVjuKASPnmG1rQ==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/rpc-spec": "2.0.0", + "@solana/rpc-types": "2.0.0" }, "engines": { - "node": ">=10" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "node_modules/@solana/addresses": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/addresses/-/addresses-2.0.0.tgz", + "integrity": "sha512-8n3c/mUlH1/z+pM8e7OJ6uDSXw26Be0dgYiokiqblO66DGQ0d+7pqFUFZ5pEGjJ9PU2lDTSfY8rHf4cemOqwzQ==", "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "@solana/assertions": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0" }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, + "node_modules/@solana/assertions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/assertions/-/assertions-2.0.0.tgz", + "integrity": "sha512-NyPPqZRNGXs/GAjfgsw7YS6vCTXWt4ibXveS+ciy5sdmp/0v3pA6DlzYjleF9Sljrew0IiON15rjaXamhDxYfQ==", "license": "MIT", "dependencies": { - "get-func-name": "^2.0.2" + "@solana/errors": "2.0.0" }, "engines": { - "node": "*" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "buffer": "~6.0.3" }, "engines": { - "node": ">= 8.10.0" + "node": ">=5.10" + } + }, + "node_modules/@solana/buffer-layout-utils": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", + "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/web3.js": "^1.32.0", + "bigint-buffer": "^1.1.5", + "bignumber.js": "^9.0.1" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "engines": { + "node": ">= 10" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", + "node_modules/@solana/buffer-layout-utils/node_modules/@solana/web3.js": { + "version": "1.98.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz", + "integrity": "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==", + "license": "MIT", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/@solana/buffer-layout-utils/node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@solana/codecs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0.tgz", + "integrity": "sha512-xneIG5ppE6WIGaZCK7JTys0uLhzlnEJUdBO8nRVIyerwH6aqCfb0fGe7q5WNNYAVDRSxC0Pc1TDe1hpdx3KWmQ==", "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@solana/codecs-core": "2.0.0", + "@solana/codecs-data-structures": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/options": "2.0.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "node_modules/@solana/codecs-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0.tgz", + "integrity": "sha512-qCG+3hDU5Pm8V6joJjR4j4Zv9md1z0RaecniNDIkEglnxmOUODnmPLWbtOjnDylfItyuZeDihK8hkewdj8cUtw==", "license": "MIT", "dependencies": { - "node-fetch": "^2.6.12" + "@solana/errors": "2.0.0" + }, + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/crypto-hash": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", - "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "node_modules/@solana/codecs-data-structures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0.tgz", + "integrity": "sha512-N98Y4jsrC/XeOgqrfsGqcOFIaOoMsKdAxOmy5oqVaEN67YoGSLNC9ROnqamOAOrsZdicTWx9/YLKFmQi9DPh1A==", "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/errors": "2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, + "node_modules/@solana/codecs-numbers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0.tgz", + "integrity": "sha512-r66i7VzJO1MZkQWZIAI6jjJOFVpnq0+FIabo2Z2ZDtrArFus/SbSEv543yCLeD2tdR/G/p+1+P5On10qF50Y1Q==", "license": "MIT", "dependencies": { - "ms": "2.1.2" + "@solana/codecs-core": "2.0.0", + "@solana/errors": "2.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=20.18.0" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, + "node_modules/@solana/codecs-strings": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0.tgz", + "integrity": "sha512-dNqeCypsvaHcjW86H0gYgAZGGkKVBeKVeh7WXlOZ9kno7PeQ2wNkpccyzDfuzaIsKv+HZUD3v/eo86GCvnKazQ==", "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/errors": "2.0.0" + }, "engines": { - "node": ">=10" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" } }, - "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "dev": true, + "node_modules/@solana/errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0.tgz", + "integrity": "sha512-IHlaPFSy4lvYco1oHJ3X8DbchWwAwJaL/4wZKnF1ugwZ0g0re8wbABrqNOe/jyZ84VU9Z14PYM8W9oDAebdJbw==", "license": "MIT", "dependencies": { - "type-detect": "^4.0.0" + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" }, "engines": { - "node": ">=6" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/delay": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", - "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "node_modules/@solana/errors/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/@solana/fast-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0.tgz", + "integrity": "sha512-EsIx9z+eoxOmC+FpzhEb+H67CCYTbs/omAqXD4EdEYnCHWrI1li1oYBV+NoKzfx8fKlX+nzNB7S/9kc4u7Etpw==", + "license": "MIT", "engines": { - "node": ">=0.3.1" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "node_modules/@solana/functional": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/functional/-/functional-2.0.0.tgz", + "integrity": "sha512-Sj+sLiUTimnMEyGnSLGt0lbih2xPDUhxhonnrIkPwA+hjQ3ULGHAxeevHU06nqiVEgENQYUJ5rCtHs4xhUFAkQ==", "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "node_modules/@solana/instructions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/instructions/-/instructions-2.0.0.tgz", + "integrity": "sha512-MiTEiNF7Pzp+Y+x4yadl2VUcNHboaW5WP52psBuhHns3GpbbruRv5efMpM9OEQNe1OsN+Eg39vjEidX55+P+DQ==", "license": "MIT", "dependencies": { - "es6-promise": "^4.0.3" + "@solana/errors": "2.0.0" + }, + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, + "node_modules/@solana/keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/keys/-/keys-2.0.0.tgz", + "integrity": "sha512-SSLSX8BXRvfLKBqsmBghmlhMKpwHeWd5CHi5zXgTS1BRrtiU6lcrTVC9ie6B+WaNNq7oe3e6K5bdbhu3fFZ+0g==", "license": "MIT", + "dependencies": { + "@solana/assertions": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0" + }, "engines": { - "node": ">=6" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, + "node_modules/@solana/options": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0.tgz", + "integrity": "sha512-OVc4KnYosB8oAukQ/htgrxXSxlUP6gUu5Aau6d/BgEkPQzWd/Pr+w91VWw3i3zZuu2SGpedbyh05RoJBe/hSXA==", "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0", + "@solana/codecs-data-structures": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0" + }, "engines": { - "node": ">=10" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "license": "MIT" - }, - "node_modules/eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "node_modules/@solana/programs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/programs/-/programs-2.0.0.tgz", + "integrity": "sha512-JPIKB61pWfODnsvEAaPALc6vR5rn7kmHLpFaviWhBtfUlEVgB8yVTR0MURe4+z+fJCPRV5wWss+svA4EeGDYzQ==", + "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0", + "@solana/errors": "2.0.0" + }, "engines": { - "node": "> 0.1.90" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/fast-stable-stringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", - "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==", - "license": "MIT" - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT" + "node_modules/@solana/promises": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/promises/-/promises-2.0.0.tgz", + "integrity": "sha512-4teQ52HDjK16ORrZe1zl+Q9WcZdQ+YEl0M1gk59XG7D0P9WqaVEQzeXGnKSCs+Y9bnB1u5xCJccwpUhHYWq6gg==", + "license": "MIT", + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" + } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "node_modules/@solana/rpc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc/-/rpc-2.0.0.tgz", + "integrity": "sha512-TumQ9DFRpib/RyaIqLVfr7UjqSo7ldfzpae0tgjM93YjbItB4Z0VcUXc3uAFvkeYw2/HIMb46Zg43mkUwozjDg==", "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "@solana/errors": "2.0.0", + "@solana/fast-stable-stringify": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/rpc-api": "2.0.0", + "@solana/rpc-spec": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "@solana/rpc-transformers": "2.0.0", + "@solana/rpc-transport-http": "2.0.0", + "@solana/rpc-types": "2.0.0" }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, + "node_modules/@solana/rpc-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-api/-/rpc-api-2.0.0.tgz", + "integrity": "sha512-1FwitYxwADMF/6zKP2kNXg8ESxB6GhNBNW1c4f5dEmuXuBbeD/enLV3WMrpg8zJkIaaYarEFNbt7R7HyFzmURQ==", "license": "MIT", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/rpc-parsed-types": "2.0.0", + "@solana/rpc-spec": "2.0.0", + "@solana/rpc-transformers": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/transaction-messages": "2.0.0", + "@solana/transactions": "2.0.0" }, "engines": { - "node": ">=10" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" + "node_modules/@solana/rpc-parsed-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0.tgz", + "integrity": "sha512-VCeY/oKVEtBnp8EDOc5LSSiOeIOLFIgLndcxqU0ij/cZaQ01DOoHbhluvhZtU80Z3dUeicec8TiMgkFzed+WhQ==", + "license": "MIT", + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", + "node_modules/@solana/rpc-spec": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-spec/-/rpc-spec-2.0.0.tgz", + "integrity": "sha512-1uIDzj7vocCUqfOifjv1zAuxQ53ugiup/42edVFoQLOnJresoEZLL6WjnsJq4oCTccEAvGhUBI1WWKeZTGNxFQ==", + "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0", + "@solana/rpc-spec-types": "2.0.0" + }, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, + "node_modules/@solana/rpc-spec-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0.tgz", + "integrity": "sha512-G2lmhFhgtxMQd/D6B04BHGE7bm5dMZdIPQNOqVGhzNAVjrmyapD3JN2hKAbmaYPe97wLfZERw0Ux1u4Y6q7TqA==", "license": "MIT", "engines": { - "node": "*" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "license": "ISC", + "node_modules/@solana/rpc-subscriptions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0.tgz", + "integrity": "sha512-AdwMJHMrhlj7q1MPjZmVcKq3iLqMW3N0MT8kzIAP2vP+8o/d6Fn4aqGxoz2Hlfn3OYIZoYStN2VBtwzbcfEgMA==", + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "@solana/errors": "2.0.0", + "@solana/fast-stable-stringify": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/promises": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "@solana/rpc-subscriptions-api": "2.0.0", + "@solana/rpc-subscriptions-channel-websocket": "2.0.0", + "@solana/rpc-subscriptions-spec": "2.0.0", + "@solana/rpc-transformers": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/subscribable": "2.0.0" }, "engines": { - "node": "*" + "node": ">=20.18.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", + "node_modules/@solana/rpc-subscriptions-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0.tgz", + "integrity": "sha512-NAJQvSFXYIIf8zxsMFBCkSbZNZgT32pzPZ1V6ZAd+U2iDEjx3L+yFwoJgfOcHp8kAV+alsF2lIsGBlG4u+ehvw==", + "license": "MIT", "dependencies": { - "is-glob": "^4.0.1" + "@solana/addresses": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/rpc-subscriptions-spec": "2.0.0", + "@solana/rpc-transformers": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/transaction-messages": "2.0.0", + "@solana/transactions": "2.0.0" }, "engines": { - "node": ">= 6" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", + "node_modules/@solana/rpc-subscriptions-channel-websocket": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0.tgz", + "integrity": "sha512-hSQDZBmcp2t+gLZsSBqs/SqVw4RuNSC7njiP46azyzW7oGg8X2YPV36AHGsHD12KPsc0UpT1OAZ4+AN9meVKww==", + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "@solana/errors": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/rpc-subscriptions-spec": "2.0.0", + "@solana/subscribable": "2.0.0" }, "engines": { - "node": "*" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5", + "ws": "^8.18.0" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, + "node_modules/@solana/rpc-subscriptions-spec": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0.tgz", + "integrity": "sha512-VXMiI3fYtU1PkVVTXL87pcY48ZY8aCi1N6FqtxSP2xg/GASL01j1qbwyIL1OvoCqGyRgIxdd/YfaByW9wmWBhA==", "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0", + "@solana/promises": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "@solana/subscribable": "2.0.0" + }, "engines": { - "node": ">=4.x" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "node_modules/@solana/rpc-transformers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-transformers/-/rpc-transformers-2.0.0.tgz", + "integrity": "sha512-H6tN0qcqzUangowsLLQtYXKJsf1Roe3/qJ1Cy0gv9ojY9uEvNbJqpeEj+7blv0MUZfEe+rECAwBhxxRKPMhYGw==", "license": "MIT", + "dependencies": { + "@solana/errors": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "@solana/rpc-types": "2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, + "node_modules/@solana/rpc-transport-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0.tgz", + "integrity": "sha512-UJLhKhhxDd1OPi8hb2AenHsDm1mofCBbhWn4bDCnH2Q3ulwYadUhcNqNbxjJPQ774VNhAf53SSI5A6PQo8IZSQ==", "license": "MIT", - "bin": { - "he": "bin/he" + "dependencies": { + "@solana/errors": "2.0.0", + "@solana/rpc-spec": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "undici-types": "^6.20.0" + }, + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "node_modules/@solana/rpc-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/rpc-types/-/rpc-types-2.0.0.tgz", + "integrity": "sha512-o1ApB9PYR0A3XjVSOh//SOVWgjDcqMlR3UNmtqciuREIBmWqnvPirdOa5EJxD3iPhfA4gnNnhGzT+tMDeDW/Kw==", "license": "MIT", "dependencies": { - "ms": "^2.0.0" + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0" + }, + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "license": "ISC", + "node_modules/@solana/signers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/signers/-/signers-2.0.0.tgz", + "integrity": "sha512-JEYJS3x/iKkqPV/3b1nLpX9lHib21wQKV3fOuu1aDLQqmX9OYKrnIIITYdnFDhmvGhpEpkkbPnqu7yVaFIBYsQ==", + "license": "MIT", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/instructions": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/transaction-messages": "2.0.0", + "@solana/transactions": "2.0.0" + }, + "engines": { + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, + "node_modules/@solana/subscribable": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/subscribable/-/subscribable-2.0.0.tgz", + "integrity": "sha512-Ex7d2GnTSNVMZDU3z6nKN4agRDDgCgBDiLnmn1hmt0iFo3alr3gRAqiqa7qGouAtYh9/29pyc8tVJCijHWJPQQ==", "license": "MIT", "dependencies": { - "binary-extensions": "^2.0.0" + "@solana/errors": "2.0.0" }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "node_modules/@solana/sysvars": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/sysvars/-/sysvars-2.0.0.tgz", + "integrity": "sha512-8D4ajKcCYQsTG1p4k30lre2vjxLR6S5MftUGJnIaQObDCzGmaeA9GRti4Kk4gSPWVYFTBoj1ASx8EcEXaB3eIQ==", "license": "MIT", + "dependencies": { + "@solana/accounts": "2.0.0", + "@solana/codecs": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/rpc-types": "2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, + "node_modules/@solana/transaction-confirmation": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0.tgz", + "integrity": "sha512-JkTw5gXLiqQjf6xK0fpVcoJ/aMp2kagtFSD/BAOazdJ3UYzOzbzqvECt6uWa3ConcMswQ2vXalVtI7ZjmYuIeg==", "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/promises": "2.0.0", + "@solana/rpc": "2.0.0", + "@solana/rpc-subscriptions": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/transaction-messages": "2.0.0", + "@solana/transactions": "2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "node_modules/@solana/transaction-messages": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/transaction-messages/-/transaction-messages-2.0.0.tgz", + "integrity": "sha512-Uc6Fw1EJLBrmgS1lH2ZfLAAKFvprWPQQzOVwZS78Pv8Whsk7tweYTK6S0Upv0nHr50rGpnORJfmdBrXE6OfNGg==", "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-data-structures": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/instructions": "2.0.0", + "@solana/rpc-types": "2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "node_modules/@solana/transactions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/transactions/-/transactions-2.0.0.tgz", + "integrity": "sha512-VfdTE+59WKvuBG//6iE9RPjAB+ZT2kLgY2CDHabaz6RkH6OjOkMez9fWPVa3Xtcus+YQWN1SnQoryjF/xSx04w==", "license": "MIT", + "dependencies": { + "@solana/addresses": "2.0.0", + "@solana/codecs-core": "2.0.0", + "@solana/codecs-data-structures": "2.0.0", + "@solana/codecs-numbers": "2.0.0", + "@solana/codecs-strings": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/instructions": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/transaction-messages": "2.0.0" + }, "engines": { - "node": ">=0.12.0" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, + "node_modules/@solana/web3.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-2.0.0.tgz", + "integrity": "sha512-x+ZRB2/r5tVK/xw8QRbAfgPcX51G9f2ifEyAQ/J5npOO+6+MPeeCjtr5UxHNDAYs9Ypo0PN+YJATCO4vhzQJGg==", "license": "MIT", + "dependencies": { + "@solana/accounts": "2.0.0", + "@solana/addresses": "2.0.0", + "@solana/codecs": "2.0.0", + "@solana/errors": "2.0.0", + "@solana/functional": "2.0.0", + "@solana/instructions": "2.0.0", + "@solana/keys": "2.0.0", + "@solana/programs": "2.0.0", + "@solana/rpc": "2.0.0", + "@solana/rpc-parsed-types": "2.0.0", + "@solana/rpc-spec-types": "2.0.0", + "@solana/rpc-subscriptions": "2.0.0", + "@solana/rpc-types": "2.0.0", + "@solana/signers": "2.0.0", + "@solana/sysvars": "2.0.0", + "@solana/transaction-confirmation": "2.0.0", + "@solana/transaction-messages": "2.0.0", + "@solana/transactions": "2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=20.18.0" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, + "node_modules/@stablelib/binary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", + "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "@stablelib/int": "^1.0.1" + } + }, + "node_modules/@stablelib/ed25519": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", + "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", + "license": "MIT", + "dependencies": { + "@stablelib/random": "^1.0.2", + "@stablelib/sha512": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/is-what": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", - "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "node_modules/@stablelib/hash": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", + "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==", "license": "MIT" }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" + "node_modules/@stablelib/int": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", + "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==", + "license": "MIT" }, - "node_modules/isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "node_modules/@stablelib/random": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", + "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", "license": "MIT", - "peerDependencies": { - "ws": "*" + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/jayson": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", - "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", + "node_modules/@stablelib/sha512": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", + "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", "license": "MIT", "dependencies": { - "@types/connect": "^3.4.33", - "@types/node": "^12.12.54", - "@types/ws": "^7.4.4", - "commander": "^2.20.3", - "delay": "^5.0.0", - "es6-promisify": "^5.0.0", - "eyes": "^0.1.8", - "isomorphic-ws": "^4.0.1", - "json-stringify-safe": "^5.0.1", - "JSONStream": "^1.3.5", - "uuid": "^8.3.2", - "ws": "^7.5.10" - }, - "bin": { - "jayson": "bin/jayson.js" - }, - "engines": { - "node": ">=8" + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/jayson/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "node_modules/@stablelib/wipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", + "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==", "license": "MIT" }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "@types/node": "*" } }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC" + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "license": "MIT" }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, "license": "MIT", - "optional": true, + "optional": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "license": "MIT", "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" + "undici-types": "~6.20.0" } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "engines": [ - "node >= 0.2.0" - ], + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "license": "MIT" }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "license": "(MIT OR Apache-2.0)", + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "license": "MIT", "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" + "@types/node": "*" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz", + "integrity": "sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==", "license": "MIT", "dependencies": { - "p-locate": "^5.0.0" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.18.2", + "@typescript-eslint/type-utils": "8.18.2", + "@typescript-eslint/utils": "8.18.2", + "@typescript-eslint/visitor-keys": "8.18.2", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, + "node_modules/@typescript-eslint/parser": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz", + "integrity": "sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==", "license": "MIT", "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "@typescript-eslint/scope-manager": "8.18.2", + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/typescript-estree": "8.18.2", + "@typescript-eslint/visitor-keys": "8.18.2", + "debug": "^4.3.4" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, + "node_modules/@typescript-eslint/parser/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { - "get-func-name": "^2.0.1" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz", + "integrity": "sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==", "license": "MIT", "dependencies": { - "tslib": "^2.0.3" + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/visitor-keys": "8.18.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" + "node_modules/@typescript-eslint/type-utils": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz", + "integrity": "sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.18.2", + "@typescript-eslint/utils": "8.18.2", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } }, - "node_modules/merge-anything": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-4.0.5.tgz", - "integrity": "sha512-YsYvYYMYZZITlVqf8UiGWVU8jI8mFNuv64iNY0hKH6alkrZsE3XNVlUnRbUvWnKIzEeYawfY8wNrTuPwHcbleA==", + "node_modules/@typescript-eslint/type-utils/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { - "is-what": "^3.14.1", - "ts-toolbelt": "^9.6.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz", + "integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==", + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/mesqueeb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz", + "integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/visitor-keys": "8.18.2", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz", + "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.18.2", + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/typescript-estree": "8.18.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz", + "integrity": "sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.18.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios-oauth-client": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios-oauth-client/-/axios-oauth-client-1.5.0.tgz", + "integrity": "sha512-CFuTfK9KdRnDDR6LQlUJ0GNKUZ3tHRSFdKPM9WqeCtUdcuKDgWt9aDFH7Xl87VpUcfNt5qRVl4iHdayqtXVv7g==", + "license": "MIT", + "dependencies": { + "qs": "^6.10.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/axios-token-interceptor": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/axios-token-interceptor/-/axios-token-interceptor-0.2.0.tgz", + "integrity": "sha512-la74OEsXBH1IS9yI6p2oTIynPtBzs0PVUSOwOBgFg2kBwTeDqQ+YJ6jaOWxsTYyqJO510OzHTfnzAn3GFuf9xA==", + "license": "MIT", + "dependencies": { + "lock": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "license": "MIT" + }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "license": "Apache-2.0", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "license": "MIT", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/canonicalize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-2.0.0.tgz", + "integrity": "sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w==", + "license": "Apache-2.0" + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "license": "WTFPL", + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/codama": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/codama/-/codama-1.1.0.tgz", + "integrity": "sha512-dr0iTND6q9goY0CwNmX5tk53iJ/KhziN/js/x2g4Dvl5K6tUGy+iR20yeBYw8lq1rwUDIocOEgKVq/HcKOI9yA==", + "license": "MIT", + "dependencies": { + "@codama/errors": "1.1.0", + "@codama/nodes": "1.1.0", + "@codama/validators": "1.1.0", + "@codama/visitors": "1.1.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "license": "MIT" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-equal-in-any-order": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/deep-equal-in-any-order/-/deep-equal-in-any-order-2.0.6.tgz", + "integrity": "sha512-RfnWHQzph10YrUjvWwhd15Dne8ciSJcZ3U6OD7owPwiVwsdE5IFSoZGg8rlwJD11ES+9H5y8j3fCofviRHOqLQ==", + "license": "MIT", + "dependencies": { + "lodash.mapvalues": "^4.6.0", + "sort-any": "^2.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/did-jwt": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/did-jwt/-/did-jwt-7.4.7.tgz", + "integrity": "sha512-Apz7nIfIHSKWIMaEP5L/K8xkwByvjezjTG0xiqwKdnNj1x8M0+Yasury5Dm/KPltxi2PlGfRPf3IejRKZrT8mQ==", + "license": "Apache-2.0", + "dependencies": { + "@noble/ciphers": "^0.4.0", + "@noble/curves": "^1.0.0", + "@noble/hashes": "^1.3.0", + "@scure/base": "^1.1.3", + "canonicalize": "^2.0.0", + "did-resolver": "^4.1.0", + "multibase": "^4.0.6", + "multiformats": "^9.6.2", + "uint8arrays": "3.1.1" + } + }, + "node_modules/did-resolver": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", + "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==", + "license": "Apache-2.0" + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.17.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-spellcheck": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/eslint-plugin-spellcheck/-/eslint-plugin-spellcheck-0.0.20.tgz", + "integrity": "sha512-GJa6vgzWAYqe0elKADAsiBRrhvqBnKyt7tpFSqlCZJsK2W9+K80oMyHhKolA7vJ13H5RCGs5/KCN+mKUyKoAiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "globals": "^13.0.0", + "hunspell-spellchecker": "^1.0.2", + "lodash": "^4.17.15" + }, + "peerDependencies": { + "eslint": ">=0.8.0" + } + }, + "node_modules/eslint-plugin-spellcheck/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "license": "MIT" + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==", + "license": "MIT" + }, + "node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", + "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "license": "CC0-1.0", + "peer": true + }, + "node_modules/fastq": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fireblocks-sdk": { + "version": "5.35.0", + "resolved": "https://registry.npmjs.org/fireblocks-sdk/-/fireblocks-sdk-5.35.0.tgz", + "integrity": "sha512-tVLxh832vowYgwNJC0SYZtvfQ9sN9lPHGLmMhfcrvbWDCjZf/mmHq2AYYROrdDqJG7lIcHdjYyyVpJs/JYTaOw==", + "license": "MIT", + "dependencies": { + "@notabene/pii-sdk": "^1.17.1", + "axios": "^1.7.7", + "jsonwebtoken": "^9.0.2", + "platform": "^1.3.6", + "qs": "^6.11.0", + "query-string": "^7.1.3", + "uuid": "^8.3.2" + } + }, + "node_modules/fireblocks-sdk/node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "license": "MIT" + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/hunspell-spellchecker": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hunspell-spellchecker/-/hunspell-spellchecker-1.0.2.tgz", + "integrity": "sha512-4DwmFAvlz+ChsqLDsZT2cwBsYNXh+oWboemxXtafwKIyItq52xfR4e4kr017sLAoPaSYVofSOvPUfmOAhXyYvw==", + "dev": true, + "license": "Apache 2", + "bin": { + "hunspell-tojson": "bin/hunspell-tojson.js" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.3.tgz", + "integrity": "sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ==", + "license": "MIT", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.5.10" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/jayson/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/jayson/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/json-stable-stringify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz", + "integrity": "sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lock": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/lock/-/lock-1.1.0.tgz", + "integrity": "sha512-NZQIJJL5Rb9lMJ0Yl1JoVr9GSdo4HTPsUEWsSFzB8dE8DSoiLCVavWZPi7Rnlv/o73u6I24S/XYc/NmG4l8EKA==", + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" + }, + "node_modules/lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ==", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, "node_modules/minimatch": { @@ -1299,436 +4083,1105 @@ "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "license": "MIT", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "license": "MIT", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==", + "license": "(Apache-2.0 AND MIT)" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nunjucks": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", + "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", + "license": "BSD-2-Clause", + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/nunjucks/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "license": "MIT" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", + "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/query-string": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "license": "MIT", + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", + "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", + "license": "LGPL-3.0-only", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/uuid": "^8.3.4", + "@types/ws": "^8.2.2", + "buffer": "^6.0.3", + "eventemitter3": "^5.0.1", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/@types/ws": { + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/rpc-websockets/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "license": "MIT", "dependencies": { - "minimist": "^1.2.6" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "license": "MIT", "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/no-case": { + "node_modules/snake-case": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", "license": "MIT", "dependencies": { - "lower-case": "^2.0.2", + "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "node_modules/solana_fireblocks_web3_provider": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd", + "license": "ISC", + "dependencies": { + "@solana/spl-token": "^0.4.6" + } + }, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/codecs": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz", + "integrity": "sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ==", "license": "MIT", "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/options": "2.0.0-rc.1" }, "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "typescript": ">=5" } }, - "node_modules/node-gyp-build": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/codecs-core": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz", + "integrity": "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ==", "license": "MIT", - "optional": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" + "dependencies": { + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz", + "integrity": "sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog==", "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", "dependencies": { - "wrappy": "1" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/codecs-numbers": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz", + "integrity": "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ==", "license": "MIT", "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/codecs-strings": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz", + "integrity": "sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g==", "license": "MIT", "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22", + "typescript": ">=5" } }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "license": "(MIT AND Zlib)" - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/errors": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz", + "integrity": "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ==", "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "chalk": "^5.3.0", + "commander": "^12.1.0" + }, + "bin": { + "errors": "bin/cli.mjs" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/options": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz", + "integrity": "sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA==", "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@solana/codecs-core": "2.0.0-rc.1", + "@solana/codecs-data-structures": "2.0.0-rc.1", + "@solana/codecs-numbers": "2.0.0-rc.1", + "@solana/codecs-strings": "2.0.0-rc.1", + "@solana/errors": "2.0.0-rc.1" + }, + "peerDependencies": { + "typescript": ">=5" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "license": "MIT", + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/spl-token": { + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.9.tgz", + "integrity": "sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg==", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/spl-token-group": "^0.0.7", + "@solana/spl-token-metadata": "^0.1.6", + "buffer": "^6.0.3" + }, "engines": { - "node": "*" + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.95.3" } }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/spl-token-group": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz", + "integrity": "sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug==", + "license": "Apache-2.0", + "dependencies": { + "@solana/codecs": "2.0.0-rc.1" + }, "engines": { - "node": ">=8.6" + "node": ">=16" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "peerDependencies": { + "@solana/web3.js": "^1.95.3" } }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/spl-token-metadata": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz", + "integrity": "sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA==", + "license": "Apache-2.0", + "dependencies": { + "@solana/codecs": "2.0.0-rc.1" }, "engines": { - "node": ">=10.13.0" + "node": ">=16" }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "peerDependencies": { + "@solana/web3.js": "^1.95.3" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/@solana/web3.js": { + "version": "1.98.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz", + "integrity": "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==", "license": "MIT", + "peer": true, "dependencies": { - "safe-buffer": "^5.1.0" + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/reflect/-/reflect-0.1.3.tgz", - "integrity": "sha512-2c5cybmpJqWWnz7PviqZZXGtYBQ3EaFAjNFPug/5tnFvC53WXPoNjpLlgzr9W3VyzY8Em9DWump40PySN1sKrw==", "engines": { - "node": ">= 0.4" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/reflect-metadata": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", - "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", - "license": "Apache-2.0" - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, + "node_modules/solana_fireblocks_web3_provider/node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", "license": "MIT", + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=14.0.0" } }, - "node_modules/rpc-websockets": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.0.4.tgz", - "integrity": "sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==", - "license": "LGPL-3.0-only", + "node_modules/solana-bankrun": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun/-/solana-bankrun-0.4.0.tgz", + "integrity": "sha512-NMmXUipPBkt8NgnyNO3SCnPERP6xT/AMNMBooljGA3+rG6NN8lmXJsKeLqQTiFsDeWD74U++QM/DgcueSWvrIg==", + "license": "MIT", "dependencies": { - "@swc/helpers": "^0.5.11", - "@types/uuid": "^8.3.4", - "@types/ws": "^8.2.2", - "buffer": "^6.0.3", - "eventemitter3": "^5.0.1", - "uuid": "^8.3.2", - "ws": "^8.5.0" + "@solana/web3.js": "^1.68.0", + "bs58": "^4.0.1" }, - "funding": { - "type": "paypal", - "url": "https://paypal.me/kozjak" + "engines": { + "node": ">= 10" }, "optionalDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "solana-bankrun-darwin-arm64": "0.4.0", + "solana-bankrun-darwin-universal": "0.4.0", + "solana-bankrun-darwin-x64": "0.4.0", + "solana-bankrun-linux-x64-gnu": "0.4.0", + "solana-bankrun-linux-x64-musl": "0.4.0" + } + }, + "node_modules/solana-bankrun-darwin-arm64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun-darwin-arm64/-/solana-bankrun-darwin-arm64-0.4.0.tgz", + "integrity": "sha512-6dz78Teoz7ez/3lpRLDjktYLJb79FcmJk2me4/YaB8WiO6W43OdExU4h+d2FyuAryO2DgBPXaBoBNY/8J1HJmw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/rpc-websockets/node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "node_modules/solana-bankrun-darwin-universal": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun-darwin-universal/-/solana-bankrun-darwin-universal-0.4.0.tgz", + "integrity": "sha512-zSSw/Jx3KNU42pPMmrEWABd0nOwGJfsj7nm9chVZ3ae7WQg3Uty0hHAkn5NSDCj3OOiN0py9Dr1l9vmRJpOOxg==", "license": "MIT", - "dependencies": { - "@types/node": "*" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/rpc-websockets/node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "license": "MIT" - }, - "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "node_modules/solana-bankrun-darwin-x64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun-darwin-x64/-/solana-bankrun-darwin-x64-0.4.0.tgz", + "integrity": "sha512-LWjs5fsgHFtyr7YdJR6r0Ho5zrtzI6CY4wvwPXr8H2m3b4pZe6RLIZjQtabCav4cguc14G0K8yQB2PTMuGub8w==", + "cpu": [ + "x64" + ], "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">= 10" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } + "node_modules/solana-bankrun-linux-x64-gnu": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun-linux-x64-gnu/-/solana-bankrun-linux-x64-gnu-0.4.0.tgz", + "integrity": "sha512-SrlVrb82UIxt21Zr/XZFHVV/h9zd2/nP25PMpLJVLD7Pgl2yhkhfi82xj3OjxoQqWe+zkBJ+uszA0EEKr67yNw==", + "cpu": [ + "x64" ], - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" + "node_modules/solana-bankrun-linux-x64-musl": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/solana-bankrun-linux-x64-musl/-/solana-bankrun-linux-x64-musl-0.4.0.tgz", + "integrity": "sha512-Nv328ZanmURdYfcLL+jwB1oMzX4ZzK57NwIcuJjGlf0XSNLq96EoaO5buEiUTo4Ls7MqqMyLbClHcrPE7/aKyA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "node_modules/solana-bankrun/node_modules/@solana/web3.js": { + "version": "1.98.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz", + "integrity": "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==", "license": "MIT", "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" + "@babel/runtime": "^7.25.0", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.1", + "node-fetch": "^2.7.0", + "rpc-websockets": "^9.0.2", + "superstruct": "^2.0.2" } }, - "node_modules/solana-program": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/solana-program/-/solana-program-0.3.6.tgz", - "integrity": "sha512-tTka0JyXw6o99fluVACbElg+aNhHEDZmeBA9avgfoFYyIvgVGzrBQE5U6s5woYXH4nqtwNgfmjCFlGdrkcsgzg==", + "node_modules/solana-bankrun/node_modules/superstruct": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", + "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", "license": "MIT", - "dependencies": { - "@solana/web3.js": "^1.30.2", - "b58": "^4.0.3", - "borsh": "^0.6.0", - "merge-anything": "^4.0.2", - "reflect": "^0.1.3", - "reflect-metadata": "^0.1.13", - "yaml": "^1.10.2" - }, "engines": { "node": ">=14.0.0" } }, - "node_modules/solana-program/node_modules/borsh": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.6.0.tgz", - "integrity": "sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q==", - "license": "Apache-2.0", + "node_modules/sort-any": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-any/-/sort-any-2.0.0.tgz", + "integrity": "sha512-T9JoiDewQEmWcnmPn/s9h/PH9t3d/LSWi0RgVmXSuDYeZXTZOZ1/wrK2PHaptuR1VXe3clLLt0pD6sgVOwjNEA==", + "license": "MIT", "dependencies": { - "bn.js": "^5.2.0", - "bs58": "^4.0.0", - "text-encoding-utf-8": "^1.0.2" + "lodash": "^4.17.21" } }, "node_modules/source-map": { @@ -1752,6 +5205,24 @@ "source-map": "^0.6.0" } }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -1795,7 +5266,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -1841,7 +5311,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -1862,6 +5331,18 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "license": "MIT" }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", @@ -1917,12 +5398,6 @@ "node": ">=0.3.1" } }, - "node_modules/ts-toolbelt": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", - "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", - "license": "Apache-2.0" - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -1943,36 +5418,111 @@ "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "license": "0BSD" }, + "node_modules/tslog": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/tslog/-/tslog-4.9.3.tgz", + "integrity": "sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/fullstack-build/tslog?sponsor=1" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.2.tgz", + "integrity": "sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.18.2", + "@typescript-eslint/parser": "8.18.2", + "@typescript-eslint/utils": "8.18.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/uint8arrays": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "license": "MIT", + "dependencies": { + "multiformats": "^9.4.2" } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/utf-8-validate": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", @@ -1996,6 +5546,21 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "license": "MIT" + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -2016,7 +5581,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -2028,6 +5592,15 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", @@ -2061,16 +5634,16 @@ "license": "ISC" }, "node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "license": "MIT", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -2091,15 +5664,6 @@ "node": ">=10" } }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2169,7 +5733,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=10" diff --git a/solana-verifier/package.json b/solana-verifier/package.json index 72d6842..5d5cdba 100644 --- a/solana-verifier/package.json +++ b/solana-verifier/package.json @@ -3,6 +3,8 @@ "scripts": { "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", + "eslint": "eslint ", + "eslint:fix": "eslint --fix", "client": "yarn run ts-node scripts/codma.ts", "deploy": "yarn run ts-node scripts/deploy.ts", "estop": "yarn run ts-node scripts/estop.ts", @@ -25,10 +27,9 @@ "decimal.js": "^10.4.3", "deep-equal-in-any-order": "^2.0.6", "dotenv": "^16.4.7", - "eslint": "^9.17.0", "fireblocks-sdk": "^5.35.0", - "solana-bankrun": "^0.4.0", "solana_fireblocks_web3_provider": "https://github.com/fireblocks/solana-web3-adapter.git", + "solana-bankrun": "^0.4.0", "tslog": "^4.9.3", "typescript-eslint": "^8.18.2" }, @@ -36,9 +37,14 @@ "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^8.18.2", + "@typescript-eslint/parser": "^8.18.2", "chai": "^4.3.4", + "eslint": "^9.17.0", + "eslint-plugin-spellcheck": "^0.0.20", + "eslint-plugin-unused-imports": "^4.1.4", "mocha": "^9.0.3", - "prettier": "^2.6.2", + "prettier": "^3.4.2", "ts-mocha": "^10.0.0", "typescript": "^5.7.2" }, diff --git a/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json index 577eaa8..087fc9f 100644 --- a/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json +++ b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json @@ -16,10 +16,7 @@ "10505242626370262277552901082094356697409835680220590971873171140371331206856", "21847035105528745403288232691147584728191162732299865338377159692350059136679" ], - [ - "1", - "0" - ] + ["1", "0"] ], "vk_gamma_2": [ [ @@ -30,10 +27,7 @@ "8495653923123431417604973247489272438418190587263600148770280649306958101930", "4082367875863433681332203403145435568316851327593401208105741076214120093531" ], - [ - "1", - "0" - ] + ["1", "0"] ], "vk_delta_2": [ [ @@ -44,10 +38,7 @@ "13740680757317479711909903993315946540841369848973133181051452051592786724563", "7710631539206257456743780535472368339139328733484942210876916214502466455394" ], - [ - "1", - "0" - ] + ["1", "0"] ], "IC": [ [ @@ -81,4 +72,4 @@ "1" ] ] -} \ No newline at end of file +} diff --git a/solana-verifier/programs/groth_16_verifier/test/data/receipt.json b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json index 51d49e8..8f27114 100644 --- a/solana-verifier/programs/groth_16_verifier/test/data/receipt.json +++ b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json @@ -1 +1,60 @@ -{"inner":{"Groth16":{"seal":[18,199,42,227,237,14,167,107,215,25,6,35,164,139,235,28,253,182,155,61,145,90,12,230,43,159,103,10,123,79,109,0,1,236,69,103,95,153,253,99,157,27,32,247,1,35,212,131,146,22,49,99,35,153,243,81,234,19,140,84,237,221,208,250,21,15,249,251,221,127,250,120,24,136,126,63,83,112,253,203,179,13,195,119,39,201,148,97,110,151,241,150,157,240,222,253,47,122,83,181,150,53,91,237,67,191,254,57,154,114,44,173,221,220,161,239,63,212,180,122,116,234,157,211,53,64,179,137,16,95,31,49,232,147,239,45,8,129,139,171,214,9,185,109,144,239,225,224,20,102,45,237,57,49,253,88,180,30,25,78,40,134,115,250,77,255,75,45,123,90,169,188,127,67,69,147,23,186,216,139,188,179,106,186,34,222,232,214,124,3,166,101,10,99,214,122,33,183,220,192,130,187,26,35,175,197,189,217,98,244,49,155,207,36,220,134,72,107,162,50,228,22,90,191,3,251,182,141,20,55,85,188,51,89,196,185,98,253,35,75,121,175,140,251,58,175,162,21,32,77,211,137,214,155,141,114],"claim":{"Value":{"pre":{"Value":{"pc":2105720,"merkle_root":[4224411480,845866751,2644154475,3950497875,173122336,1840638066,2988445566,2047025840]}},"post":{"Value":{"pc":0,"merkle_root":[0,0,0,0,0,0,0,0]}},"exit_code":{"Halted":0},"input":{"Pruned":[0,0,0,0,0,0,0,0]},"output":{"Value":{"journal":{"Value":[1,0,0,120]},"assumptions":{"Value":[]}}}}},"verifier_parameters":[1763163472,2876521993,3272685530,2018367509,394453731,2734973759,718893618,4111358395]}},"journal":{"bytes":[1,0,0,120]},"metadata":{"verifier_parameters":[1763163472,2876521993,3272685530,2018367509,394453731,2734973759,718893618,4111358395]}} \ No newline at end of file +{ + "inner": { + "Groth16": { + "seal": [ + 18, 199, 42, 227, 237, 14, 167, 107, 215, 25, 6, 35, 164, 139, 235, 28, + 253, 182, 155, 61, 145, 90, 12, 230, 43, 159, 103, 10, 123, 79, 109, 0, + 1, 236, 69, 103, 95, 153, 253, 99, 157, 27, 32, 247, 1, 35, 212, 131, + 146, 22, 49, 99, 35, 153, 243, 81, 234, 19, 140, 84, 237, 221, 208, 250, + 21, 15, 249, 251, 221, 127, 250, 120, 24, 136, 126, 63, 83, 112, 253, + 203, 179, 13, 195, 119, 39, 201, 148, 97, 110, 151, 241, 150, 157, 240, + 222, 253, 47, 122, 83, 181, 150, 53, 91, 237, 67, 191, 254, 57, 154, + 114, 44, 173, 221, 220, 161, 239, 63, 212, 180, 122, 116, 234, 157, 211, + 53, 64, 179, 137, 16, 95, 31, 49, 232, 147, 239, 45, 8, 129, 139, 171, + 214, 9, 185, 109, 144, 239, 225, 224, 20, 102, 45, 237, 57, 49, 253, 88, + 180, 30, 25, 78, 40, 134, 115, 250, 77, 255, 75, 45, 123, 90, 169, 188, + 127, 67, 69, 147, 23, 186, 216, 139, 188, 179, 106, 186, 34, 222, 232, + 214, 124, 3, 166, 101, 10, 99, 214, 122, 33, 183, 220, 192, 130, 187, + 26, 35, 175, 197, 189, 217, 98, 244, 49, 155, 207, 36, 220, 134, 72, + 107, 162, 50, 228, 22, 90, 191, 3, 251, 182, 141, 20, 55, 85, 188, 51, + 89, 196, 185, 98, 253, 35, 75, 121, 175, 140, 251, 58, 175, 162, 21, 32, + 77, 211, 137, 214, 155, 141, 114 + ], + "claim": { + "Value": { + "pre": { + "Value": { + "pc": 2105720, + "merkle_root": [ + 4224411480, 845866751, 2644154475, 3950497875, 173122336, + 1840638066, 2988445566, 2047025840 + ] + } + }, + "post": { + "Value": { "pc": 0, "merkle_root": [0, 0, 0, 0, 0, 0, 0, 0] } + }, + "exit_code": { "Halted": 0 }, + "input": { "Pruned": [0, 0, 0, 0, 0, 0, 0, 0] }, + "output": { + "Value": { + "journal": { "Value": [1, 0, 0, 120] }, + "assumptions": { "Value": [] } + } + } + } + }, + "verifier_parameters": [ + 1763163472, 2876521993, 3272685530, 2018367509, 394453731, 2734973759, + 718893618, 4111358395 + ] + } + }, + "journal": { "bytes": [1, 0, 0, 120] }, + "metadata": { + "verifier_parameters": [ + 1763163472, 2876521993, 3272685530, 2018367509, 394453731, 2734973759, + 718893618, 4111358395 + ] + } +} diff --git a/solana-verifier/scripts/acceptOwnership.ts b/solana-verifier/scripts/acceptOwnership.ts index b8c301a..1aeacff 100644 --- a/solana-verifier/scripts/acceptOwnership.ts +++ b/solana-verifier/scripts/acceptOwnership.ts @@ -1,7 +1,6 @@ import { createLogger, createRpc, - getNewOwnerAddress, getRouterAddress, getTransactionSigner, } from "./utils/utils"; diff --git a/solana-verifier/scripts/addVerifier.ts b/solana-verifier/scripts/addVerifier.ts index 646d47f..04e2380 100644 --- a/solana-verifier/scripts/addVerifier.ts +++ b/solana-verifier/scripts/addVerifier.ts @@ -19,7 +19,7 @@ async function runAddVerifier() { const owner = await getTransactionSigner(); logger.info( - `Using Router: ${routerAddress}, adding verifier ${verifierAddress}` + `Using Router: ${routerAddress}, adding verifier ${verifierAddress}`, ); const rpc = createRpc(); @@ -33,7 +33,7 @@ async function runAddVerifier() { rpc.rpc_subscription, verifierAddress, deployer, - routerPda.address + routerPda.address, ); logger.info("Adding the verifier to the Router"); @@ -42,7 +42,7 @@ async function runAddVerifier() { rpc.rpc_subscription, verifierAddress, routerAddress, - owner + owner, ); logger.info("Verifier was successfully added to the router"); diff --git a/solana-verifier/scripts/codma.ts b/solana-verifier/scripts/codma.ts index f5e53bf..3c18d24 100644 --- a/solana-verifier/scripts/codma.ts +++ b/solana-verifier/scripts/codma.ts @@ -7,7 +7,7 @@ import path from "node:path"; const routerIdlPath = path.normalize("../target/idl/verifier_router.json"); const grothIdlPath = path.normalize("../target/idl/groth_16_verifier.json"); const badVerifierIdlPath = path.normalize( - "../target/idl/test_bad_verifier.json" + "../target/idl/test_bad_verifier.json", ); const loaderV3IdlPath = path.normalize("../idl/loader-v3.json"); const loaderV4IdlPath = path.normalize("../idl/loader-v4.json"); diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index 7c6c883..f07fe23 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -20,9 +20,8 @@ import { Programs, verifiable, } from "./utils/utils"; -import { initilizeRouter } from "./utils/init"; +import { initializeRouter } from "./utils/init"; import { addVerifier } from "./utils/addVerifier"; -import { Lamports } from "@solana/web3.js"; const logger = createLogger(); @@ -106,10 +105,10 @@ async function run_deployment(): Promise { ); logger.info(`Groth 16 Verifier Program Address will be: ${verifier_address}`); - logger.info("Programs succesfully deployed"); + logger.info("Programs successfully deployed"); - // Initilize the Router by setting owner for the contract and creating the PDA - await initilizeRouter(rpc.rpc, rpc.rpc_subscription, routerAddress, owner); + // Initialize the Router by setting owner for the contract and creating the PDA + await initializeRouter(rpc.rpc, rpc.rpc_subscription, routerAddress, owner); // Setup the Groth 16 Verifiers Upgrade authority to be the Router PDA const routerPda = await getRouterPda(routerAddress); @@ -130,7 +129,7 @@ async function run_deployment(): Promise { owner ); - logger.info("Programs deployed and initilized"); + logger.info("Programs deployed and initialized"); } run_deployment().catch((error) => console.error(error)); diff --git a/solana-verifier/scripts/estop.ts b/solana-verifier/scripts/estop.ts index 6f11a11..e62c619 100644 --- a/solana-verifier/scripts/estop.ts +++ b/solana-verifier/scripts/estop.ts @@ -15,7 +15,7 @@ const logger = createLogger(); async function collectUserInput(): Promise { console.log( - "Script to call Estop initated, answer the following questions to continue:" + "Script to call Estop initiated, answer the following questions to continue:" ); const input = Number(await rl.question("Enter Verifier selector (u32): ")); const verify = Number( @@ -39,7 +39,7 @@ async function collectUserInput(): Promise { async function run_estop() { logger.info("Verifier Estop By Owner Script Started"); logger.warn( - "CALLING E-STOP ON A VERIFIER IS IRREVERSABLE, MAKE SURE THIS IS WHAT YOU WANT TO DO" + "CALLING E-STOP ON A VERIFIER IS IRREVERSIBLE, MAKE SURE THIS IS WHAT YOU WANT TO DO" ); const rpc = createRpc(); diff --git a/solana-verifier/scripts/renounceOwnership.ts b/solana-verifier/scripts/renounceOwnership.ts index d8beb92..e91dcec 100644 --- a/solana-verifier/scripts/renounceOwnership.ts +++ b/solana-verifier/scripts/renounceOwnership.ts @@ -15,10 +15,10 @@ const logger = createLogger(); async function ConfirmOperation() { console.log( - "Script will Renounce Ownership, Verify intent by answering the prompt:" + "Script will Renounce Ownership, Verify intent by answering the prompt:", ); const confirm = await rl.question( - 'Type "YES CALL RENOUNCE OWNERSHIP" to confirm: ' + 'Type "YES CALL RENOUNCE OWNERSHIP" to confirm: ', ); if (confirm !== "YES CALL RENOUNCE OWNERSHIP") { logger.error("User input did not match above confirmation, Exiting."); diff --git a/solana-verifier/scripts/transferOwnership.ts b/solana-verifier/scripts/transferOwnership.ts index e1452aa..1a0f705 100644 --- a/solana-verifier/scripts/transferOwnership.ts +++ b/solana-verifier/scripts/transferOwnership.ts @@ -22,7 +22,7 @@ async function runTransferOwnership() { rpc.rpc_subscription, routerAddress, owner, - newOwner + newOwner, ); logger.info("Verifier Router Ownership Transfer Script Completed"); diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts index 529a531..3d7cc3d 100644 --- a/solana-verifier/scripts/utils/addVerifier.ts +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -1,7 +1,5 @@ import { Address, - getAddressCodec, - getProgramDerivedAddress, Rpc, RpcSubscriptions, SolanaRpcApi, @@ -9,8 +7,6 @@ import { TransactionSigner, } from "@solana/web3.js"; import { - getTransactionSigner, - createRpc, sendTransaction, getRouterPda, getVerifierEntryPda, @@ -18,14 +14,11 @@ import { createLogger, } from "./utils"; import { - fetchVerifierEntry, fetchVerifierRouter, getAddVerifierInstruction, } from "../verify-router"; -import { - getSetAuthorityInstruction, - SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, -} from "../loaderV3"; + + const logger = createLogger(); @@ -34,10 +27,10 @@ export async function addVerifier( rpcSubscriptions: RpcSubscriptions, verifierAddress: Address, routerAddress: Address, - owner: TransactionSigner + owner: TransactionSigner, ): Promise { logger.info( - `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}` + `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}`, ); logger.debug(`Using the address: ${owner.address} as owner`); @@ -45,19 +38,19 @@ export async function addVerifier( const routerPDA = await getRouterPda(routerAddress); logger.debug( - `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}` + `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}`, ); const routerData = await fetchVerifierRouter(rpc, routerPDA.address); logger.debug( - `Current verifier entry count is ${routerData.data.verifierCount}` + `Current verifier entry count is ${routerData.data.verifierCount}`, ); const selector = routerData.data.verifierCount + 1; logger.info( - `Using ${selector} as the selector for the verifier at address ${verifierAddress}` + `Using ${selector} as the selector for the verifier at address ${verifierAddress}`, ); const routerEntry = await getVerifierEntryPda(routerAddress, selector); @@ -75,7 +68,7 @@ export async function addVerifier( verifierProgram: verifierAddress, verifierProgramData: verifierProgramData.address, }, - { programAddress: routerAddress } + { programAddress: routerAddress }, ); await sendTransaction({ diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts index d8c3bf9..05ab319 100644 --- a/solana-verifier/scripts/utils/deploy.ts +++ b/solana-verifier/scripts/utils/deploy.ts @@ -2,22 +2,12 @@ import { promisify } from "util"; import process from "child_process"; import { verifiable, - loadDefaultKeypair, - loadOwnerAddress, Programs, - getLocalKeypair, - sendTransaction, - createRpc, - getTransactionSigner, } from "./utils"; import { address, Address, - createSolanaRpc, - createTransactionMessage, - getProgramDerivedAddress, } from "@solana/web3.js"; -import { getInitializeInstruction } from "../verify-router"; const exec = promisify(process.exec); export async function build_cli(): Promise { @@ -44,7 +34,7 @@ interface DeploymentOutput { export async function deploy_cli( program: Programs, verify: boolean, - upgradable: boolean + upgradable: boolean, ): Promise> { const command = [`anchor deploy --program-name ${program}`]; diff --git a/solana-verifier/scripts/utils/estop.ts b/solana-verifier/scripts/utils/estop.ts index 668ff3c..f0fb295 100644 --- a/solana-verifier/scripts/utils/estop.ts +++ b/solana-verifier/scripts/utils/estop.ts @@ -28,13 +28,13 @@ export async function estopByOwner( rpcSubscriptions: RpcSubscriptions, routerAddress: Address, owner: TransactionSigner, - selector: number + selector: number, ): Promise { logger.warn( - "EMERGENCY STOP HAS BEEN STARTED, THIS IS IRREVERSABLE...Program Will sleep for 5 seconds Kill program immediatly if not intentional, attempting to terminate a verifier!" + "EMERGENCY STOP HAS BEEN STARTED, THIS IS IRREVERSABLE...Program Will sleep for 5 seconds Kill program immediatly if not intentional, attempting to terminate a verifier!", ); logger.info( - `Emeregency Stop attempting to stop verifier with Selector: ${selector} on router ${routerAddress}` + `Emeregency Stop attempting to stop verifier with Selector: ${selector} on router ${routerAddress}`, ); await sleep(5000); // Sleep for 5 seconds in case this was an accident @@ -50,7 +50,7 @@ export async function estopByOwner( const verifierProgramData = await getProgramDataAddress(verifierAddress); logger.info( - `Attempting to terminate verifier with address: ${verifierAddress}` + `Attempting to terminate verifier with address: ${verifierAddress}`, ); const estopInstruction = getEmergencyStopInstruction( @@ -65,7 +65,7 @@ export async function estopByOwner( }, { programAddress: routerAddress, - } + }, ); await sendTransaction({ diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts index 7b01c8d..a97f576 100644 --- a/solana-verifier/scripts/utils/fireblocksSigner.ts +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -9,7 +9,7 @@ import { sleep, usingFireblocks, } from "./utils"; -import { Address, address } from "@solana/addresses"; +import { address } from "@solana/addresses"; // import { ApiBaseUrl } from "solana_fireblocks_web3_provider/src/types"; // import { // FireblocksSDK, @@ -25,11 +25,7 @@ import { TransactionResponse, TransactionStateEnum, } from "@fireblocks/ts-sdk"; -import { - getBase58Codec, - getBase16Codec, - SignatureBytes, -} from "@solana/web3.js"; +import { getBase16Codec, SignatureBytes } from "@solana/web3.js"; import { PeerType } from "fireblocks-sdk"; export type FireBlocksSigner = @@ -38,8 +34,6 @@ export type FireBlocksSigner = fireblocks: Fireblocks; }; -export type FireblocksBaseUrl = "testnet" | "mainnet-beta" | "devnet"; - const logger = createLogger(); export interface FireblocksConfig { @@ -67,12 +61,6 @@ export function parseBasePath(value: string): BasePath { export async function createSignerFromFireblocksConfig( config: FireblocksConfig ): Promise { - // const fireblocksClient = new FireblocksSDK( - // config.apiSecret, - // config.apiKey, - // config.apiBaseUrl - // ); - const fireblocks = new Fireblocks({ apiKey: config.apiKey, secretKey: config.apiSecret, diff --git a/solana-verifier/scripts/utils/init.ts b/solana-verifier/scripts/utils/init.ts index fa226e4..7d6d7ef 100644 --- a/solana-verifier/scripts/utils/init.ts +++ b/solana-verifier/scripts/utils/init.ts @@ -1,23 +1,6 @@ -import { promisify } from "util"; -import process from "child_process"; +import { sendTransaction, getRouterPda, createLogger } from "./utils"; import { - verifiable, - loadDefaultKeypair, - loadOwnerAddress, - Programs, - getLocalKeypair, - sendTransaction, - createRpc, - getTransactionSigner, - getRouterPda, - createLogger, -} from "./utils"; -import { - address, Address, - createSolanaRpc, - createTransactionMessage, - getProgramDerivedAddress, Rpc, RpcSubscriptions, SolanaRpcApi, @@ -26,7 +9,7 @@ import { } from "@solana/web3.js"; import { getInitializeInstruction } from "../verify-router"; -export async function initilizeRouter( +export async function initializeRouter( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, routerAddress: Address, @@ -35,9 +18,9 @@ export async function initilizeRouter( const log = createLogger(); log.info( - `Initilizing the Verifier Router at address: ${routerAddress} with owner: ${owner.address}` + `Initializing the Verifier Router at address: ${routerAddress} with owner: ${owner.address}` ); - // Configrue the Verifier Router program + // Configure the Verifier Router program const routerPDA = await getRouterPda(routerAddress); log.debug( @@ -53,7 +36,7 @@ export async function initilizeRouter( ); log.info( - "Attempting to submit the Verifier Router Initilization Instruction" + "Attempting to submit the Verifier Router Initialization Instruction" ); await sendTransaction({ diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts index e39f15c..b7727ef 100644 --- a/solana-verifier/scripts/utils/ownership.ts +++ b/solana-verifier/scripts/utils/ownership.ts @@ -25,7 +25,7 @@ export async function transferOwnership( newOwner: Address ) { logger.info( - `Transfering ownership from ${owner} to new owner: ${newOwner} for router ${routerAddress}` + `Transferring ownership from ${owner} to new owner: ${newOwner} for router ${routerAddress}` ); const routerPda = await getRouterPda(routerAddress); @@ -124,7 +124,7 @@ export async function cancelTransfer( }); logger.info( - `Ownership transfer cancelation transaction confirmed. ${routerData.data.ownership.pendingOwner} may no longer accept ownership of the transfer.` + `Ownership transfer cancellation transaction confirmed. ${routerData.data.ownership.pendingOwner} may no longer accept ownership of the transfer.` ); } @@ -134,7 +134,7 @@ export async function renounceOwnership( routerAddress: Address, owner: TransactionSigner ) { - logger.warn("RENOUNCE OWNERSHIP HAS BEEN CALLED, THIS IS IRREVERSABLE..."); + logger.warn("RENOUNCE OWNERSHIP HAS BEEN CALLED, THIS IS IRREVERSIBLE..."); logger.warn( "Once renounced no new verifier may be added to the router, and Emergency Stop can only be called by producing a verifiably bad proof." ); diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 1b1ebba..7199e81 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -13,7 +13,6 @@ import { setTransactionMessageLifetimeUsingBlockhash, signTransactionMessageWithSigners, createTransactionMessage, - pipe, SolanaRpcSubscriptionsApi, Commitment, BaseTransactionMessage, @@ -22,7 +21,6 @@ import { KeyPairSigner, Address, address, - createSolanaRpcApi, RpcFromTransport, RpcTransport, SolanaRpcApiFromTransport, @@ -93,7 +91,6 @@ import { getFireblocksSigner, parseBasePath, } from "./fireblocksSigner"; -import { FireblocksConnectionAdapterConfig } from "solana_fireblocks_web3_provider/src/types"; export enum Programs { VerifierRouter = "verifier_router", @@ -108,7 +105,7 @@ type BlockhashTransaction = BaseTransactionMessage & TransactionMessageWithBlockhashLifetime; export interface SendTransactionParams< - TTransaction extends BlockhashTransaction + TTransaction extends BlockhashTransaction, > { rpc: Rpc; rpcSubscriptions: RpcSubscriptions; @@ -118,7 +115,7 @@ export interface SendTransactionParams< } export async function sendTransaction< - TTransaction extends BlockhashTransaction + TTransaction extends BlockhashTransaction, >({ rpc, rpcSubscriptions, @@ -153,37 +150,13 @@ export async function sendTransaction< ); // Sign the transaction - const signedTransaction = await signTransactionMessageWithSigners( - finalTransaction - ); + const signedTransaction = + await signTransactionMessageWithSigners(finalTransaction); // Send and confirm the transaction await sendAndConfirmTransaction(signedTransaction, { commitment }); } -// TODO: Optional Extra bit -// // Of course the IDL generated for the LoaderV3 wolud not have any state data -// // to parse ProgramData accounts, lets do it manually... -// export async function getProgramData(rpc: Rpc, rpcSubscriptions: RpcSubscriptions, programDataAddress: Address) { -// getAccount -// } - -// export async function getAuthority( -// rpc: Rpc, -// rpcSubscriptions: RpcSubscriptions, -// programAddress: Address -// ): Promise> { -// logger.trace( -// `Fetching the current authority for the program at address: ${programAddress}` -// ); -// const programDataAddress = await getProgramDataAddress(programAddress); - -// logger.trace( -// `Using ${programDataAddress} as the address for authority lookup` -// ); - -// } - export async function sleep(ms: number): Promise { return new Promise((res) => setTimeout(res, ms)); } diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index 717bcfb..2cbd3ca 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -22,7 +22,6 @@ import { import { sendTransaction, loadDefaultKeypair, - getRouterAddress, getVerifierEntryPda, PDA, getProgramDataAddress, @@ -40,20 +39,13 @@ import { Rpc, SolanaRpcApi, TransactionPartialSigner, - ProgramDerivedAddress, some, none, - getU32Codec, - getProgramDerivedAddress, Address, - ProgramDerivedAddressBump, RpcSubscriptions, SolanaRpcSubscriptionsApi, - getAddressCodec, KeyPairSigner, BaseTransactionMessage, - SolanaError, - SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, lamports, } from "@solana/web3.js"; @@ -62,7 +54,6 @@ import deepEqualInAnyOrder from "deep-equal-in-any-order"; import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../scripts/groth16"; import { TEST_BAD_VERIFIER_PROGRAM_ADDRESS } from "../scripts/bad-verifier"; import { - getSetAuthorityInstruction, SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, } from "../scripts/loaderV3"; @@ -75,7 +66,7 @@ async function expectError( promise: Promise, errorType: string, errorMessage?: string, - log: boolean = false + log: boolean = false, ): Promise { try { await promise; @@ -105,7 +96,7 @@ describe("verifier-router", () => { let notOwner: TransactionPartialSigner; let sendTx: ( instruction: TTransaction["instructions"][number], - authority?: TransactionPartialSigner + authority?: TransactionPartialSigner, ) => Promise; // Test Proof for the Test Bad Verifier @@ -140,21 +131,21 @@ describe("verifier-router", () => { // Calculate the PDA for the Router Program const routerAddressPDA = await getRouterPda( - VERIFIER_ROUTER_PROGRAM_ADDRESS + VERIFIER_ROUTER_PROGRAM_ADDRESS, ); routerAddress = routerAddressPDA.address; // Calculate the PDA for the Groth16 Verifier Program grothPda = await getVerifierEntryPda( VERIFIER_ROUTER_PROGRAM_ADDRESS, - GROTH16_SELECTOR + GROTH16_SELECTOR, ); grothPDAAddress = grothPda.address; console.log(`Groth Verifier (Verifier Entry) Address: ${grothPDAAddress}`); const grothProgramData = await getProgramDataAddress( - GROTH16_VERIFIER_PROGRAM_ADDRESS + GROTH16_VERIFIER_PROGRAM_ADDRESS, ); grothProgramDataAddress = grothProgramData.address; @@ -163,22 +154,22 @@ describe("verifier-router", () => { // Calculate the PDA for the TestBadVerifier Program badVerifierPda = await getVerifierEntryPda( VERIFIER_ROUTER_PROGRAM_ADDRESS, - TEST_BAD_SELECTOR + TEST_BAD_SELECTOR, ); badVerifierPDAAddress = badVerifierPda.address; console.log( - `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}` + `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}`, ); const badVerifierProgramData = await getProgramDataAddress( - TEST_BAD_VERIFIER_PROGRAM_ADDRESS + TEST_BAD_VERIFIER_PROGRAM_ADDRESS, ); badVerifierProgramDataAddress = badVerifierProgramData.address; console.log( - `Bad Verifier Program Data Address: ${badVerifierProgramDataAddress}` + `Bad Verifier Program Data Address: ${badVerifierProgramDataAddress}`, ); }); @@ -235,7 +226,7 @@ describe("verifier-router", () => { await expectError( sendTx(transactionInstruction), - "VerifierInvalidAuthority" + "VerifierInvalidAuthority", ); }); @@ -245,7 +236,7 @@ describe("verifier-router", () => { rpcSubscriptions, TEST_BAD_VERIFIER_PROGRAM_ADDRESS, deployerKeyPair, - routerAddress + routerAddress, ); }); @@ -262,7 +253,7 @@ describe("verifier-router", () => { await expectError( sendTx(addBadVerifierInstruction), "ConstraintSeeds", - "Expected to get a Constraint Seeds error, but did not" + "Expected to get a Constraint Seeds error, but did not", ); }); @@ -272,7 +263,7 @@ describe("verifier-router", () => { rpcSubscriptions, GROTH16_VERIFIER_PROGRAM_ADDRESS, deployerKeyPair, - routerAddress + routerAddress, ); }); @@ -289,7 +280,7 @@ describe("verifier-router", () => { await expectError( sendTx(addGrothInstruction), "NotOwner", - "A non-owner was able to add a verifier to the router" + "A non-owner was able to add a verifier to the router", ); }); @@ -306,7 +297,7 @@ describe("verifier-router", () => { await expectError( sendTx(addBadVerifierInstruction), "SelectorInvalid", - "Was expecting an Invalid Selector Error" + "Was expecting an Invalid Selector Error", ); }); @@ -341,7 +332,7 @@ describe("verifier-router", () => { const grothAccount = await fetchVerifierEntry(rpc, grothPDAAddress); expect(grothAccount.data.selector).to.equal(GROTH16_SELECTOR); expect(grothAccount.data.verifier).to.equal( - GROTH16_VERIFIER_PROGRAM_ADDRESS + GROTH16_VERIFIER_PROGRAM_ADDRESS, ); await sendTx(addBadVerifierInstruction); @@ -349,7 +340,7 @@ describe("verifier-router", () => { const badAccount = await fetchVerifierEntry(rpc, badVerifierPDAAddress); expect(badAccount.data.selector).to.equal(TEST_BAD_SELECTOR); expect(badAccount.data.verifier).to.equal( - TEST_BAD_VERIFIER_PROGRAM_ADDRESS + TEST_BAD_VERIFIER_PROGRAM_ADDRESS, ); routerAccount = await fetchVerifierRouter(rpc, routerAddress); @@ -388,7 +379,7 @@ describe("verifier-router", () => { await expectError( sendTx(verifyInstruction), "VerificationError", - "Expected to hit a Verification Error but the transaction did not error out." + "Expected to hit a Verification Error but the transaction did not error out.", ); }); @@ -409,7 +400,7 @@ describe("verifier-router", () => { await expectError( sendTx(estopProofInstruction), "VerificationError", - "Was expecting the estop call to fail but it did not" + "Was expecting the estop call to fail but it did not", ); }); @@ -445,7 +436,7 @@ describe("verifier-router", () => { const verifierEntry = await fetchMaybeVerifierEntry( rpc, - badVerifierPDAAddress + badVerifierPDAAddress, ); expect(verifierEntry.exists).to.equal(false); diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index 10d4a27..d213d2f 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -11,7 +11,7 @@ "@codama/errors@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/errors/-/errors-1.1.0.tgz#3ee488f2a597a0508881b0759a486f5b96434d1a" + resolved "https://registry.npmjs.org/@codama/errors/-/errors-1.1.0.tgz" integrity sha512-njLWTPYgz5uJP02617CX0BZCHGHrHnQvKroU0z4YcJZiaMQlw3VLzb+e2ZU2X+uVpp+3ITJZ9yexuoEhJBVQdQ== dependencies: "@codama/node-types" "1.1.0" @@ -20,12 +20,12 @@ "@codama/node-types@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/node-types/-/node-types-1.1.0.tgz#8223d3cb67386ec9617cb04627abecdbcd8ce8ee" + resolved "https://registry.npmjs.org/@codama/node-types/-/node-types-1.1.0.tgz" integrity sha512-+J6E0didCY0+8dr2vI6ag+FMaMr3SemvXJYKOhxKEJ6HXR/J+7cddpptXyrIhLa8R2Kw0yzIG9VjAlUGL7u8OQ== -"@codama/nodes-from-anchor@1.0.1", "@codama/nodes-from-anchor@^1.0.1": +"@codama/nodes-from-anchor@^1.0.1", "@codama/nodes-from-anchor@1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz#e3243ccb480e658b28c639ba99777ad35c8ae13a" + resolved "https://registry.npmjs.org/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz" integrity sha512-9sITAJyWxjbuBqeSmiA/AzN15+65KvycPJmc0ReWWsbqBCblr0A5jeA/zFbfILRFcu6MVyJXpQvl42FZ/vAL1g== dependencies: "@codama/errors" "1.1.0" @@ -35,7 +35,7 @@ "@codama/nodes@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/nodes/-/nodes-1.1.0.tgz#cc843b6b8be8ee7fbdd6eaad57dd37b55a30b90d" + resolved "https://registry.npmjs.org/@codama/nodes/-/nodes-1.1.0.tgz" integrity sha512-a6lX45CqfvdU5jKx63zWVEUbyAjEKqjye3EkboKNEJIM0RDmDwtTqNuQBR8HHx9nO7EBPypxYOXtGpmVXg0xYw== dependencies: "@codama/errors" "1.1.0" @@ -43,7 +43,7 @@ "@codama/renderers-core@1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@codama/renderers-core/-/renderers-core-1.0.1.tgz#0a0a526498c0f766d43e14786d7780386b37eeed" + resolved "https://registry.npmjs.org/@codama/renderers-core/-/renderers-core-1.0.1.tgz" integrity sha512-EOOQx2s5t6huVJRXwwLC6adyqSuDPVKIWXiDhy5uyJBRlNk18/vb4OmVoXTIWb6mS64m/j0DuyrWJWzIUUJ84w== dependencies: "@codama/errors" "1.1.0" @@ -52,7 +52,7 @@ "@codama/renderers-js-umi@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/renderers-js-umi/-/renderers-js-umi-1.1.0.tgz#7af94c5fac6c799365addf02330a346a618a920d" + resolved "https://registry.npmjs.org/@codama/renderers-js-umi/-/renderers-js-umi-1.1.0.tgz" integrity sha512-PxHuvRlqD2jwK3QtK/eKGZ8QmRx8htcSEM8ylZWwsgs4Wtd7LZgEZezwrzTpSgGPcH3PWoYyBRfER8Q3XwrcDA== dependencies: "@codama/errors" "1.1.0" @@ -66,7 +66,7 @@ "@codama/renderers-js@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/renderers-js/-/renderers-js-1.1.0.tgz#4c479771dcb18ca4b2e677e6a5fd69ed145665d2" + resolved "https://registry.npmjs.org/@codama/renderers-js/-/renderers-js-1.1.0.tgz" integrity sha512-LeFLDlKb726q6VARnuKCQ0qV2c0xS6s7U1jF7WrecMj3zrWy5hN1yGKKEZdItq95M0JOawbHbejjP9aiJ4R7Kw== dependencies: "@codama/errors" "1.1.0" @@ -80,7 +80,7 @@ "@codama/renderers-rust@1.0.4": version "1.0.4" - resolved "https://registry.yarnpkg.com/@codama/renderers-rust/-/renderers-rust-1.0.4.tgz#6a64cba990803ff5b7cc14a2d977804ceb4b6bc5" + resolved "https://registry.npmjs.org/@codama/renderers-rust/-/renderers-rust-1.0.4.tgz" integrity sha512-+THq6bCInn30dKEGGNrilnbaitA8A3pOjfsqwka/i3Aip5x5At6lk7VcQwoWzDvvcy/2FHaOVi3hmlc28d8maw== dependencies: "@codama/errors" "1.1.0" @@ -92,7 +92,7 @@ "@codama/renderers@^1.0.4": version "1.0.4" - resolved "https://registry.yarnpkg.com/@codama/renderers/-/renderers-1.0.4.tgz#0bd80a953543a8de8d49349c793e3b8e63f740dc" + resolved "https://registry.npmjs.org/@codama/renderers/-/renderers-1.0.4.tgz" integrity sha512-4M1RGHFOoaZrbABiFREtcL3pEITxnOlVJIeMwzWY5wDE+v8C1eT6LLP6GjjljZY9FmJXrRSzTJsXbWwBzYLhKw== dependencies: "@codama/renderers-js" "1.1.0" @@ -101,7 +101,7 @@ "@codama/validators@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/validators/-/validators-1.1.0.tgz#804b5d0e44ed977ab82d6df0daf8ca8f68f2c23f" + resolved "https://registry.npmjs.org/@codama/validators/-/validators-1.1.0.tgz" integrity sha512-TVzTjN2m1bGauLnqJE12lZfZf1L2C9Hal7/i0sjNmtc3UbUL7pIH5Rp4bFSyfDuyhMD0JfxtJqr3YlK6yXoqkA== dependencies: "@codama/errors" "1.1.0" @@ -110,7 +110,7 @@ "@codama/visitors-core@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/visitors-core/-/visitors-core-1.1.0.tgz#b7aaf5ca92fabb91a480458cb61046c0e3b39cc9" + resolved "https://registry.npmjs.org/@codama/visitors-core/-/visitors-core-1.1.0.tgz" integrity sha512-NBJAgGmVdFIWHDsKSKjTYbIfSZRyRzgqPzmHFgRIRjy4Uw63zOwP5Yk1bctWrP6YRlGjrTunfVkOIA6QiVr6lg== dependencies: "@codama/errors" "1.1.0" @@ -119,7 +119,7 @@ "@codama/visitors@1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@codama/visitors/-/visitors-1.1.0.tgz#22ec6e0be2b3babc9cc74e80ed6a64af84f71fbb" + resolved "https://registry.npmjs.org/@codama/visitors/-/visitors-1.1.0.tgz" integrity sha512-QpAShuxemS8oplHDXNqnUnYwhJq58RZjfZ/KMIpdm88OCBnQRO4YfM/zQLEvXjA+tpwJpe4WnL6opTLLnSYThw== dependencies: "@codama/errors" "1.1.0" @@ -162,19 +162,19 @@ "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.1" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz" integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== dependencies: eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": version "4.12.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== "@eslint/config-array@^0.19.0": version "0.19.1" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.1.tgz#734aaea2c40be22bbb1f2a9dac687c57a6a4c984" + resolved "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz" integrity sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA== dependencies: "@eslint/object-schema" "^2.1.5" @@ -183,14 +183,14 @@ "@eslint/core@^0.9.0": version "0.9.1" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.1.tgz#31763847308ef6b7084a4505573ac9402c51f9d1" + resolved "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz" integrity sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q== dependencies: "@types/json-schema" "^7.0.15" "@eslint/eslintrc@^3.2.0": version "3.2.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz" integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" @@ -203,38 +203,38 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.17.0", "@eslint/js@^9.17.0": +"@eslint/js@^9.17.0", "@eslint/js@9.17.0": version "9.17.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.17.0.tgz#1523e586791f80376a6f8398a3964455ecc651ec" + resolved "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz" integrity sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w== "@eslint/object-schema@^2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.5.tgz#8670a8f6258a2be5b2c620ff314a1d984c23eb2e" + resolved "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz" integrity sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ== "@eslint/plugin-kit@^0.2.3": version "0.2.4" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz#2b78e7bb3755784bb13faa8932a1d994d6537792" + resolved "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz" integrity sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg== dependencies: levn "^0.4.1" "@ethersproject/bytes@5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" "@ethersproject/logger@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== "@fireblocks/ts-sdk@^6.0.0": version "6.0.0" - resolved "https://registry.yarnpkg.com/@fireblocks/ts-sdk/-/ts-sdk-6.0.0.tgz#6a672bafe25ce9cb761e2f3d0e1efb6a54640112" + resolved "https://registry.npmjs.org/@fireblocks/ts-sdk/-/ts-sdk-6.0.0.tgz" integrity sha512-LB4XKc5B7Lr3wjQG9VKjWj2BW5tmIwA83xG2fI7breawNcrWOP8ck60OfESA0ePaSlBXk342ZE/tHX57leJC2g== dependencies: axios "^1.6.7" @@ -244,12 +244,12 @@ "@humanfs/core@^0.19.1": version "0.19.1" - resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz" integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== "@humanfs/node@^0.16.6": version "0.16.6" - resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + resolved "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz" integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: "@humanfs/core" "^0.19.1" @@ -257,74 +257,57 @@ "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/retry@^0.3.0": version "0.3.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + resolved "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz" integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== "@humanwhocodes/retry@^0.4.1": version "0.4.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + resolved "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz" integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== "@multiformats/base-x@^4.0.1": version "4.0.1" - resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" + resolved "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz" integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw== "@noble/ciphers@^0.4.0": version "0.4.1" - resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-0.4.1.tgz#977fc35f563a4ca315ebbc4cbb1f9b670bd54456" + resolved "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz" integrity sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg== -"@noble/curves@^1.0.0", "@noble/curves@^1.1.0": +"@noble/curves@^1.0.0", "@noble/curves@^1.1.0", "@noble/curves@^1.4.2": version "1.7.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz" integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== dependencies: "@noble/hashes" "1.6.0" -"@noble/curves@^1.4.2": +"@noble/hashes@^1.3.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@1.6.0": version "1.6.0" - resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz" - integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== - dependencies: - "@noble/hashes" "1.5.0" - -"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz" - integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== - -"@noble/hashes@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz" integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== -"@noble/hashes@^1.3.0", "@noble/hashes@^1.5.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" - integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== - "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -332,7 +315,7 @@ "@notabene/pii-sdk@^1.17.1": version "1.17.1" - resolved "https://registry.yarnpkg.com/@notabene/pii-sdk/-/pii-sdk-1.17.1.tgz#36fcf88589e42bf816354daeba52a8fb904c7a87" + resolved "https://registry.npmjs.org/@notabene/pii-sdk/-/pii-sdk-1.17.1.tgz" integrity sha512-lCDPl58SQBAEihDIHtkghVH7fNOtdngDM9DJrDW+odEKAnB0+o6r5V+AeiNYIfRwkn8nXiCW7i3SsNMmLlj5Zw== dependencies: "@ethersproject/bytes" "5.7.0" @@ -355,41 +338,41 @@ "@scure/base@^1.1.3": version "1.2.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + resolved "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz" integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== -"@solana/accounts@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/accounts/-/accounts-2.0.0-rc.4.tgz#f6529f291e92cc95eafb5b549e79ea8997088902" - integrity sha512-LRznpCi1v/c+Gfp7/6t/kWDzTRZAPmzyr1Id3uRFsjOqGgeHYtdsK7Jw+9KMmO+PUrHqdRIFISZNMty/T17h4g== +"@solana/accounts@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/accounts/-/accounts-2.0.0.tgz" + integrity sha512-1CE4P3QSDH5x+ZtSthMY2mn/ekROBnlT3/4f3CHDJicDvLQsgAq2yCvGHsYkK3ZA0mxhFLuhJVjuKASPnmG1rQ== dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/rpc-spec" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-types" "2.0.0" -"@solana/addresses@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/addresses/-/addresses-2.0.0-rc.4.tgz#13ca6dce9bf131d4990ea72f66624b041ac15166" - integrity sha512-AR9g6pZMqCZeH/dShmaqyTQRCgWtZpYPQZYMazA6I5EsrKq1A40Cfxqgb/iMNl/g3vfVunT25UASH3YwBQyL/A== +"@solana/addresses@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/addresses/-/addresses-2.0.0.tgz" + integrity sha512-8n3c/mUlH1/z+pM8e7OJ6uDSXw26Be0dgYiokiqblO66DGQ0d+7pqFUFZ5pEGjJ9PU2lDTSfY8rHf4cemOqwzQ== dependencies: - "@solana/assertions" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" + "@solana/assertions" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" -"@solana/assertions@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/assertions/-/assertions-2.0.0-rc.4.tgz#0c6e921aa9b560c269a76a4a00bf15dbdbc1c0f8" - integrity sha512-CkTwoysagNAOjWynNzvrS5842/uDhEBjRbmgYRFurbWNLjo62j3eTYJKgTcMml7nc564Y4gObC5lUwWShGMZ/A== +"@solana/assertions@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/assertions/-/assertions-2.0.0.tgz" + integrity sha512-NyPPqZRNGXs/GAjfgsw7YS6vCTXWt4ibXveS+ciy5sdmp/0v3pA6DlzYjleF9Sljrew0IiON15rjaXamhDxYfQ== dependencies: - "@solana/errors" "2.0.0-rc.4" + "@solana/errors" "2.0.0" "@solana/buffer-layout-utils@^0.2.0": version "0.2.0" - resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + resolved "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz" integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== dependencies: "@solana/buffer-layout" "^4.0.0" @@ -406,73 +389,73 @@ "@solana/codecs-core@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz#1a2d76b9c7b9e7b7aeb3bd78be81c2ba21e3ce22" + resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz" integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== dependencies: "@solana/errors" "2.0.0-rc.1" -"@solana/codecs-core@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.4.tgz#c4280d68877a078df4b430871db159f95534fcd3" - integrity sha512-JIrTSps032mSE3wBxW3bXOqWfoy4CMy1CX/XeVCijyh5kLVxZTSDIdRTYdePdL1yzaOZF1Xysvt1DhOUgBdM+A== +"@solana/codecs-core@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0.tgz" + integrity sha512-qCG+3hDU5Pm8V6joJjR4j4Zv9md1z0RaecniNDIkEglnxmOUODnmPLWbtOjnDylfItyuZeDihK8hkewdj8cUtw== dependencies: - "@solana/errors" "2.0.0-rc.4" + "@solana/errors" "2.0.0" "@solana/codecs-data-structures@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz#d47b2363d99fb3d643f5677c97d64a812982b888" + resolved "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz" integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== dependencies: "@solana/codecs-core" "2.0.0-rc.1" "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" -"@solana/codecs-data-structures@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.4.tgz#0a435341901d72c48ef56b6e7ed335c71e4e323c" - integrity sha512-smF4Z4WCbr3ppoZhhT7/e5XMG6VFSHFPDLsayt4aHUvP1clZAew5uOy0qLY0qdxbttSmfoxXqf2SUFpJw8Jadg== +"@solana/codecs-data-structures@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0.tgz" + integrity sha512-N98Y4jsrC/XeOgqrfsGqcOFIaOoMsKdAxOmy5oqVaEN67YoGSLNC9ROnqamOAOrsZdicTWx9/YLKFmQi9DPh1A== dependencies: - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" "@solana/codecs-numbers@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz#f34978ddf7ea4016af3aaed5f7577c1d9869a614" + resolved "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz" integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== dependencies: "@solana/codecs-core" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" -"@solana/codecs-numbers@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.4.tgz#ad95848d64dbaab4f6f0935d042df00802c84bba" - integrity sha512-ZJR7TaUO65+3Hzo3YOOUCS0wlzh17IW+j0MZC2LCk1R0woaypRpHKj4iSMYeQOZkMxsd9QT3WNvjFrPC2qA6Sw== +"@solana/codecs-numbers@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0.tgz" + integrity sha512-r66i7VzJO1MZkQWZIAI6jjJOFVpnq0+FIabo2Z2ZDtrArFus/SbSEv543yCLeD2tdR/G/p+1+P5On10qF50Y1Q== dependencies: - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0" + "@solana/errors" "2.0.0" "@solana/codecs-strings@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz#e1d9167075b8c5b0b60849f8add69c0f24307018" + resolved "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz" integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== dependencies: "@solana/codecs-core" "2.0.0-rc.1" "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" -"@solana/codecs-strings@2.0.0-rc.4", "@solana/codecs-strings@rc": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.4.tgz#6a9223c074ab2422a7da3a8fc60cd398c6b8e167" - integrity sha512-LGfK2RL0BKjYYUfzu2FG/gTgCsYOMz9FKVs2ntji6WneZygPxJTV5W98K3J8Rl0JewpCSCFQH3xjLSHBJUS0fA== +"@solana/codecs-strings@2.0.0", "@solana/codecs-strings@rc": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0.tgz" + integrity sha512-dNqeCypsvaHcjW86H0gYgAZGGkKVBeKVeh7WXlOZ9kno7PeQ2wNkpccyzDfuzaIsKv+HZUD3v/eo86GCvnKazQ== dependencies: - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" "@solana/codecs@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.1.tgz#146dc5db58bd3c28e04b4c805e6096c2d2a0a875" + resolved "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz" integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== dependencies: "@solana/codecs-core" "2.0.0-rc.1" @@ -481,63 +464,63 @@ "@solana/codecs-strings" "2.0.0-rc.1" "@solana/options" "2.0.0-rc.1" -"@solana/codecs@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.4.tgz#d47a442e3da5d6109694a321e2a23f1b36fb8fe1" - integrity sha512-h9GQGYLfBifzLhyZuef5FUaZGxLW7JNLDlEYCErA7x7Ty2ssF98sswsLsWKcbv5Cz1QsW7A6xGv4PCjvIDOCxQ== +"@solana/codecs@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0.tgz" + integrity sha512-xneIG5ppE6WIGaZCK7JTys0uLhzlnEJUdBO8nRVIyerwH6aqCfb0fGe7q5WNNYAVDRSxC0Pc1TDe1hpdx3KWmQ== dependencies: - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-data-structures" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/options" "2.0.0-rc.4" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/options" "2.0.0" "@solana/errors@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.1.tgz#3882120886eab98a37a595b85f81558861b29d62" + resolved "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz" integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== dependencies: chalk "^5.3.0" commander "^12.1.0" -"@solana/errors@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.4.tgz#4a5aa0d82206b07f31e729262f47def34397ac61" - integrity sha512-0PPaMyB81keEHG/1pnyEuiBVKctbXO641M2w3CIOrYT/wzjunfF0FTxsqq9wYJeYo0AyiefCKGgSPs6wiY2PpQ== +"@solana/errors@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0.tgz" + integrity sha512-IHlaPFSy4lvYco1oHJ3X8DbchWwAwJaL/4wZKnF1ugwZ0g0re8wbABrqNOe/jyZ84VU9Z14PYM8W9oDAebdJbw== dependencies: chalk "^5.3.0" commander "^12.1.0" -"@solana/fast-stable-stringify@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0-rc.4.tgz#13cc3e8366fb60d4952f62c561f914c874240fef" - integrity sha512-5N4S+/EGZw0Y6s2aQPNTpiB2yii2oOcrfPKXSkK4ZR2GqZuA6u6BJiJeUelXeB8P24KMxOZXfzCrkBBpEzYt6w== +"@solana/fast-stable-stringify@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0.tgz" + integrity sha512-EsIx9z+eoxOmC+FpzhEb+H67CCYTbs/omAqXD4EdEYnCHWrI1li1oYBV+NoKzfx8fKlX+nzNB7S/9kc4u7Etpw== -"@solana/functional@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/functional/-/functional-2.0.0-rc.4.tgz#0d8cb83806ee54fd65bbf8e517183e75c6f54d6c" - integrity sha512-P/rL15Svl4sREO7tqQ6V/E8zPAlIBGBnA0T75gZYGoSY5644rCiEaFoqyMkXc9l563lj1B5vV5UU8FCPkpPwmQ== +"@solana/functional@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/functional/-/functional-2.0.0.tgz" + integrity sha512-Sj+sLiUTimnMEyGnSLGt0lbih2xPDUhxhonnrIkPwA+hjQ3ULGHAxeevHU06nqiVEgENQYUJ5rCtHs4xhUFAkQ== -"@solana/instructions@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/instructions/-/instructions-2.0.0-rc.4.tgz#42fe4a305c5c34c9d325e3a2461efe5f8b8956f7" - integrity sha512-k4KcNfrWQX5Zhij9mn6d10MnHEP4YD9qsG8SQHWTELbyoZt3UjzfzG2aY88ao3VDWz3S9JbFIzA11wjJ0TYFxg== +"@solana/instructions@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/instructions/-/instructions-2.0.0.tgz" + integrity sha512-MiTEiNF7Pzp+Y+x4yadl2VUcNHboaW5WP52psBuhHns3GpbbruRv5efMpM9OEQNe1OsN+Eg39vjEidX55+P+DQ== dependencies: - "@solana/errors" "2.0.0-rc.4" + "@solana/errors" "2.0.0" -"@solana/keys@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/keys/-/keys-2.0.0-rc.4.tgz#7d438918b4d0d374bd4d2526fb184c9140e7ccdc" - integrity sha512-EcepAutaXVwiW0bQZMv2gSUd+gjxL8FrqzX+BeqkfNNe1c4GxtLHOlASOXhPEH/3iGEaz6mfV6Bn5KkctWOeEA== +"@solana/keys@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/keys/-/keys-2.0.0.tgz" + integrity sha512-SSLSX8BXRvfLKBqsmBghmlhMKpwHeWd5CHi5zXgTS1BRrtiU6lcrTVC9ie6B+WaNNq7oe3e6K5bdbhu3fFZ+0g== dependencies: - "@solana/assertions" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" + "@solana/assertions" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" "@solana/options@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.1.tgz#06924ba316dc85791fc46726a51403144a85fc4d" + resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz" integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== dependencies: "@solana/codecs-core" "2.0.0-rc.1" @@ -546,191 +529,191 @@ "@solana/codecs-strings" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" -"@solana/options@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.4.tgz#f6f6fd8b8f6f25605f5ee0e03e526128e7364462" - integrity sha512-5W8aswMBhcdv2pD5lHLdHIZ98ymhQNBmeFncEoVZLTrshf7KqyxZ8xtILcWNCUgOev1+yp9hMTNV9SEgrgyNrQ== - dependencies: - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-data-structures" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - -"@solana/programs@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/programs/-/programs-2.0.0-rc.4.tgz#d2f9fd36a705094ad47d784c00085cb5860e7323" - integrity sha512-aIspYII4+EdOtK2EZaTSYNVxSzn0R1b9Lir7S+PftmzVMLOP3R5MhVb5IJcZRByJngfW227CyKQXh34fg2wWOg== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - -"@solana/promises@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/promises/-/promises-2.0.0-rc.4.tgz#3e01502cff67ba473c3544d6a9cbd71eb853bdf2" - integrity sha512-NIY7rdtpw+le0P2vgXigJiGI54fE/bLpyiIKHfyYyjyTzCph8TmoHPX2Y/mmkmlri54tu5BM/X0UbIoXVi2dpw== - -"@solana/rpc-api@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-api/-/rpc-api-2.0.0-rc.4.tgz#7bd5378fdb82b0b857f97d6f2f48d46b522694d1" - integrity sha512-z6KyTvVd0WkXb8WhuLAF3vLstdGl5+FVQTgxu1BbBD94bBEUC8Zg7sZuT0AS/Qdgo4Bt/oNcgXsD2DbFmb0HpQ== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/rpc-parsed-types" "2.0.0-rc.4" - "@solana/rpc-spec" "2.0.0-rc.4" - "@solana/rpc-transformers" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" - "@solana/transactions" "2.0.0-rc.4" - -"@solana/rpc-parsed-types@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0-rc.4.tgz#eac850b5c1e94f836a051c0bdcaf337ca65604fa" - integrity sha512-UvNcfi5S6WI54/t7TFi1sgdvl9wFLnk7Rmwsuq/UksAx9FuN+bdZvywkXYioh5PkcZxaDTaupnNoGRPDFxW87g== - -"@solana/rpc-spec-types@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0-rc.4.tgz#23f4bb949607318e5ba954e3d1fb9eb47d3a9d6e" - integrity sha512-xmyh8+xvOcm6OgxFzHNLNWs8zSjV1xOFrTtE4g44QArmzEYylzoP9bFBUEoaZvBG9ACAvT2scvwhUEREFXRAWg== - -"@solana/rpc-spec@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-spec/-/rpc-spec-2.0.0-rc.4.tgz#e2f5b1937db90074e17b2164befa2e1ced3be2b2" - integrity sha512-SuME1MDYwotEDCBh0gKV50Zp2IJE/gEZc04MZBgEtEsyqB8mg9DL7PRSANJhGtx7b5gX31xw5sJmGlPHp/oUEA== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - -"@solana/rpc-subscriptions-api@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0-rc.4.tgz#14ff6358a048a7a242d31ef96a08dc721b79d9a2" - integrity sha512-4TOOlYGIOqKI3vBRjQz8dZYKjExQhBUDrO1USOUm/s6GAMkNY5TVmlqvQxzo7BlsJu8f7cpK8RrQap/Ej9jHOQ== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" - "@solana/rpc-transformers" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" - "@solana/transactions" "2.0.0-rc.4" - -"@solana/rpc-subscriptions-channel-websocket@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0-rc.4.tgz#43db37b4b60eecc7b3c589201cfe7ab40ea50d04" - integrity sha512-Rj8vb+f5gXrJ2KBA1+gJ1eXnjawG2vNtuL/WWd/CD1xEzmBV9oFXbzcGG7tTLsQWSM9+BcgiMGhhKg5DCnpWcQ== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" - "@solana/subscribable" "2.0.0-rc.4" - -"@solana/rpc-subscriptions-spec@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0-rc.4.tgz#9cd92e70cb2d1ee3f6e2eca6fabe00007894489c" - integrity sha512-B0C8TYiErD34YMgdk9fmbzTti8Xo8JFYuF/2acFRD1WPLVE3UrEJSjxrmj7Lv/bO40wHvWrhUtHtzo37s9anAA== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/promises" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - "@solana/subscribable" "2.0.0-rc.4" - -"@solana/rpc-subscriptions@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0-rc.4.tgz#8a294a5ddd59f8e381275beae25444de6a654b47" - integrity sha512-9fRn2/mr6a+7hknWaqA39lSN2hO1qOIQzaOz7zql5Gj1jKM5yorgqlXBdTuCi6pRn5zni9c4yz8fU6jVJQZnGA== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/fast-stable-stringify" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/promises" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - "@solana/rpc-subscriptions-api" "2.0.0-rc.4" - "@solana/rpc-subscriptions-channel-websocket" "2.0.0-rc.4" - "@solana/rpc-subscriptions-spec" "2.0.0-rc.4" - "@solana/rpc-transformers" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/subscribable" "2.0.0-rc.4" - -"@solana/rpc-transformers@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-transformers/-/rpc-transformers-2.0.0-rc.4.tgz#4c34d6493552e577f4ad0e967d387bc13e18a398" - integrity sha512-KpLkW6V/eAuQvZCdvCCNvcYQvq8XCxwCNmY6Y+ZJYU4EWCdMppGe4p+JJVL6buRRSGrTBW+muLhKKDsZdx/4VQ== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - -"@solana/rpc-transport-http@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0-rc.4.tgz#38bf5d2d99a62ca3d8c1f670239f4465b9df6bc9" - integrity sha512-Xu6+uEPYHPF8gAJ6KsmGXqtA02Dbv9mKykf0nazt91YP66k4HYF8PaYLbGSrNR76o4TewdbqFJlipSceMJb86w== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/rpc-spec" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" +"@solana/options@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0.tgz" + integrity sha512-OVc4KnYosB8oAukQ/htgrxXSxlUP6gUu5Aau6d/BgEkPQzWd/Pr+w91VWw3i3zZuu2SGpedbyh05RoJBe/hSXA== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/programs@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/programs/-/programs-2.0.0.tgz" + integrity sha512-JPIKB61pWfODnsvEAaPALc6vR5rn7kmHLpFaviWhBtfUlEVgB8yVTR0MURe4+z+fJCPRV5wWss+svA4EeGDYzQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/promises@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/promises/-/promises-2.0.0.tgz" + integrity sha512-4teQ52HDjK16ORrZe1zl+Q9WcZdQ+YEl0M1gk59XG7D0P9WqaVEQzeXGnKSCs+Y9bnB1u5xCJccwpUhHYWq6gg== + +"@solana/rpc-api@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-api/-/rpc-api-2.0.0.tgz" + integrity sha512-1FwitYxwADMF/6zKP2kNXg8ESxB6GhNBNW1c4f5dEmuXuBbeD/enLV3WMrpg8zJkIaaYarEFNbt7R7HyFzmURQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-parsed-types" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/rpc-parsed-types@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0.tgz" + integrity sha512-VCeY/oKVEtBnp8EDOc5LSSiOeIOLFIgLndcxqU0ij/cZaQ01DOoHbhluvhZtU80Z3dUeicec8TiMgkFzed+WhQ== + +"@solana/rpc-spec-types@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0.tgz" + integrity sha512-G2lmhFhgtxMQd/D6B04BHGE7bm5dMZdIPQNOqVGhzNAVjrmyapD3JN2hKAbmaYPe97wLfZERw0Ux1u4Y6q7TqA== + +"@solana/rpc-spec@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-spec/-/rpc-spec-2.0.0.tgz" + integrity sha512-1uIDzj7vocCUqfOifjv1zAuxQ53ugiup/42edVFoQLOnJresoEZLL6WjnsJq4oCTccEAvGhUBI1WWKeZTGNxFQ== + dependencies: + "@solana/errors" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + +"@solana/rpc-subscriptions-api@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0.tgz" + integrity sha512-NAJQvSFXYIIf8zxsMFBCkSbZNZgT32pzPZ1V6ZAd+U2iDEjx3L+yFwoJgfOcHp8kAV+alsF2lIsGBlG4u+ehvw== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/rpc-subscriptions-channel-websocket@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0.tgz" + integrity sha512-hSQDZBmcp2t+gLZsSBqs/SqVw4RuNSC7njiP46azyzW7oGg8X2YPV36AHGsHD12KPsc0UpT1OAZ4+AN9meVKww== + dependencies: + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-subscriptions-spec@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0.tgz" + integrity sha512-VXMiI3fYtU1PkVVTXL87pcY48ZY8aCi1N6FqtxSP2xg/GASL01j1qbwyIL1OvoCqGyRgIxdd/YfaByW9wmWBhA== + dependencies: + "@solana/errors" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-subscriptions@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0.tgz" + integrity sha512-AdwMJHMrhlj7q1MPjZmVcKq3iLqMW3N0MT8kzIAP2vP+8o/d6Fn4aqGxoz2Hlfn3OYIZoYStN2VBtwzbcfEgMA== + dependencies: + "@solana/errors" "2.0.0" + "@solana/fast-stable-stringify" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-subscriptions-api" "2.0.0" + "@solana/rpc-subscriptions-channel-websocket" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-transformers@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-transformers/-/rpc-transformers-2.0.0.tgz" + integrity sha512-H6tN0qcqzUangowsLLQtYXKJsf1Roe3/qJ1Cy0gv9ojY9uEvNbJqpeEj+7blv0MUZfEe+rECAwBhxxRKPMhYGw== + dependencies: + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/rpc-transport-http@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0.tgz" + integrity sha512-UJLhKhhxDd1OPi8hb2AenHsDm1mofCBbhWn4bDCnH2Q3ulwYadUhcNqNbxjJPQ774VNhAf53SSI5A6PQo8IZSQ== + dependencies: + "@solana/errors" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" undici-types "^6.20.0" -"@solana/rpc-types@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc-types/-/rpc-types-2.0.0-rc.4.tgz#3991da33e98ea0e692d5477443cdd302f98bb04e" - integrity sha512-uSWW/VndwYF29gpvKxWo0skTxrsCKl+fYmeJz5mduIULjhr5SFdgchgb4KCcAlUMgFn4HJuwALJVHpUg0Wv10Q== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - -"@solana/rpc@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/rpc/-/rpc-2.0.0-rc.4.tgz#fa27311279a0ea1be844e47432d22ac6880118cb" - integrity sha512-YqQPf1raKUdle6iiEPQavaCdXCaX2XxHJIeZQ93lTvwuntoQUK8yAbT4go6eYQRwgL2SnR/0C4p5fnv8f/vR/A== - dependencies: - "@solana/errors" "2.0.0-rc.4" - "@solana/fast-stable-stringify" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/rpc-api" "2.0.0-rc.4" - "@solana/rpc-spec" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - "@solana/rpc-transformers" "2.0.0-rc.4" - "@solana/rpc-transport-http" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - -"@solana/signers@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/signers/-/signers-2.0.0-rc.4.tgz#58fa869d8e0c5cb07a1ea1f19fa01c0f45d86208" - integrity sha512-4Wm8BsXkEpiomgmsthOregxIJibL2KIzMp2NbsTQMuzB3HzRv6ATtHoiQACqnsUm0hfTV217lE/GeJdYyqHCIA== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/instructions" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" - "@solana/transactions" "2.0.0-rc.4" +"@solana/rpc-types@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc-types/-/rpc-types-2.0.0.tgz" + integrity sha512-o1ApB9PYR0A3XjVSOh//SOVWgjDcqMlR3UNmtqciuREIBmWqnvPirdOa5EJxD3iPhfA4gnNnhGzT+tMDeDW/Kw== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/rpc@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/rpc/-/rpc-2.0.0.tgz" + integrity sha512-TumQ9DFRpib/RyaIqLVfr7UjqSo7ldfzpae0tgjM93YjbItB4Z0VcUXc3uAFvkeYw2/HIMb46Zg43mkUwozjDg== + dependencies: + "@solana/errors" "2.0.0" + "@solana/fast-stable-stringify" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-api" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-transport-http" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/signers@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/signers/-/signers-2.0.0.tgz" + integrity sha512-JEYJS3x/iKkqPV/3b1nLpX9lHib21wQKV3fOuu1aDLQqmX9OYKrnIIITYdnFDhmvGhpEpkkbPnqu7yVaFIBYsQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" "@solana/spl-token-group@^0.0.7": version "0.0.7" - resolved "https://registry.yarnpkg.com/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz#83c00f0cd0bda33115468cd28b89d94f8ec1fee4" + resolved "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz" integrity sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug== dependencies: "@solana/codecs" "2.0.0-rc.1" "@solana/spl-token-metadata@^0.1.6": version "0.1.6" - resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz#d240947aed6e7318d637238022a7b0981b32ae80" + resolved "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz" integrity sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA== dependencies: "@solana/codecs" "2.0.0-rc.1" "@solana/spl-token@^0.4.6": version "0.4.9" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.4.9.tgz#24d032d2935f237925c3b058ba6bb1e1ece5428c" + resolved "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.9.tgz" integrity sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg== dependencies: "@solana/buffer-layout" "^4.0.0" @@ -739,73 +722,73 @@ "@solana/spl-token-metadata" "^0.1.6" buffer "^6.0.3" -"@solana/subscribable@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/subscribable/-/subscribable-2.0.0-rc.4.tgz#cdeacd725bb9966f64bb90d8a02a24b717a51000" - integrity sha512-ZMEL0P/kdpKeqpPI/r/zV0aCqpA2LKzd94DVOSHgDGRFWfvotRl197PInU5rcsFH1VmPsuoFH68SZYV4+2DC9Q== - dependencies: - "@solana/errors" "2.0.0-rc.4" - -"@solana/sysvars@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/sysvars/-/sysvars-2.0.0-rc.4.tgz#aabf458ed5f143fbe03f3d45ad6bcdc3d5d87a71" - integrity sha512-z4XVv308IQL9RkGDPkACr2GHUrM/czzsXuv1kUscfmZmvmY77RQqaC85UYow0+opghnDpmEEssZRaWjMeVvkYw== - dependencies: - "@solana/accounts" "2.0.0-rc.4" - "@solana/codecs" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - -"@solana/transaction-confirmation@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0-rc.4.tgz#8852d796ac0b79d09ec8622602c28153cdd6b18f" - integrity sha512-ImBMZ+vkMglDECUEr8SFZw+V0Bm5TrCmNUAMqlfOgGO8v8pQUaVql0V9/KjiXu12TUYEcDZqp0PDLQ+D4I8aFg== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/promises" "2.0.0-rc.4" - "@solana/rpc" "2.0.0-rc.4" - "@solana/rpc-subscriptions" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" - "@solana/transactions" "2.0.0-rc.4" - -"@solana/transaction-messages@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/transaction-messages/-/transaction-messages-2.0.0-rc.4.tgz#7098a744ca6a1f63961eaa1b59a7701d330b07d9" - integrity sha512-zdeNIb6EtD9faVzEEfXm7Td+u5ifNCxF1/QBF6oURxaUcfX7bGXJ/P3VM0wAQ80t5zBQeqm2qzUkfEvf07NllQ== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-data-structures" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/instructions" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - -"@solana/transactions@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/transactions/-/transactions-2.0.0-rc.4.tgz#7246fa19e760d636ff60fb0d8eedc6df365c126a" - integrity sha512-n2TQ59S/SQ+LCyTgOZNXGT9gYMbMj+XeH2eMXFbg6ETs7Bhn0DE1lIfHQCq9m6JQEJ2lgH9NYFU+QDd3LGLUog== - dependencies: - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs-core" "2.0.0-rc.4" - "@solana/codecs-data-structures" "2.0.0-rc.4" - "@solana/codecs-numbers" "2.0.0-rc.4" - "@solana/codecs-strings" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/instructions" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" +"@solana/subscribable@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/subscribable/-/subscribable-2.0.0.tgz" + integrity sha512-Ex7d2GnTSNVMZDU3z6nKN4agRDDgCgBDiLnmn1hmt0iFo3alr3gRAqiqa7qGouAtYh9/29pyc8tVJCijHWJPQQ== + dependencies: + "@solana/errors" "2.0.0" + +"@solana/sysvars@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/sysvars/-/sysvars-2.0.0.tgz" + integrity sha512-8D4ajKcCYQsTG1p4k30lre2vjxLR6S5MftUGJnIaQObDCzGmaeA9GRti4Kk4gSPWVYFTBoj1ASx8EcEXaB3eIQ== + dependencies: + "@solana/accounts" "2.0.0" + "@solana/codecs" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/transaction-confirmation@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0.tgz" + integrity sha512-JkTw5gXLiqQjf6xK0fpVcoJ/aMp2kagtFSD/BAOazdJ3UYzOzbzqvECt6uWa3ConcMswQ2vXalVtI7ZjmYuIeg== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc" "2.0.0" + "@solana/rpc-subscriptions" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/transaction-messages@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/transaction-messages/-/transaction-messages-2.0.0.tgz" + integrity sha512-Uc6Fw1EJLBrmgS1lH2ZfLAAKFvprWPQQzOVwZS78Pv8Whsk7tweYTK6S0Upv0nHr50rGpnORJfmdBrXE6OfNGg== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/transactions@2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/transactions/-/transactions-2.0.0.tgz" + integrity sha512-VfdTE+59WKvuBG//6iE9RPjAB+ZT2kLgY2CDHabaz6RkH6OjOkMez9fWPVa3Xtcus+YQWN1SnQoryjF/xSx04w== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" "@solana/web3.js@^1.32.0": version "1.98.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.0.tgz#21ecfe8198c10831df6f0cfde7f68370d0405917" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== dependencies: "@babel/runtime" "^7.25.0" @@ -825,9 +808,30 @@ superstruct "^2.0.2" "@solana/web3.js@^1.68.0": - version "1.95.5" - resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.95.5.tgz" - integrity sha512-hU9cBrbg1z6gEjLH9vwIckGBVB78Ijm0iZFNk4ocm5OD82piPwuk3MeQ1rfiKD9YQtr95krrcaopb49EmQJlRg== + version "1.98.0" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" + integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + +"@solana/web3.js@^1.95.3": + version "1.98.0" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" + integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== dependencies: "@babel/runtime" "^7.25.0" "@noble/curves" "^1.4.2" @@ -846,39 +850,39 @@ superstruct "^2.0.2" "@solana/web3.js@^2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-2.0.0-rc.4.tgz#6fe711939ed0f0977cf42b7fa8fa0d706958a82d" - integrity sha512-w1r5MjLd+6roeqMc0Dght4tLco3W9Zdoq56FnSKnbcP7Ji/L6VTdFJttf8vaIAAMDyUH5aH1yLxHrqCIW1kbrw== - dependencies: - "@solana/accounts" "2.0.0-rc.4" - "@solana/addresses" "2.0.0-rc.4" - "@solana/codecs" "2.0.0-rc.4" - "@solana/errors" "2.0.0-rc.4" - "@solana/functional" "2.0.0-rc.4" - "@solana/instructions" "2.0.0-rc.4" - "@solana/keys" "2.0.0-rc.4" - "@solana/programs" "2.0.0-rc.4" - "@solana/rpc" "2.0.0-rc.4" - "@solana/rpc-parsed-types" "2.0.0-rc.4" - "@solana/rpc-spec-types" "2.0.0-rc.4" - "@solana/rpc-subscriptions" "2.0.0-rc.4" - "@solana/rpc-types" "2.0.0-rc.4" - "@solana/signers" "2.0.0-rc.4" - "@solana/sysvars" "2.0.0-rc.4" - "@solana/transaction-confirmation" "2.0.0-rc.4" - "@solana/transaction-messages" "2.0.0-rc.4" - "@solana/transactions" "2.0.0-rc.4" + version "2.0.0" + resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-2.0.0.tgz" + integrity sha512-x+ZRB2/r5tVK/xw8QRbAfgPcX51G9f2ifEyAQ/J5npOO+6+MPeeCjtr5UxHNDAYs9Ypo0PN+YJATCO4vhzQJGg== + dependencies: + "@solana/accounts" "2.0.0" + "@solana/addresses" "2.0.0" + "@solana/codecs" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/programs" "2.0.0" + "@solana/rpc" "2.0.0" + "@solana/rpc-parsed-types" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-subscriptions" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/signers" "2.0.0" + "@solana/sysvars" "2.0.0" + "@solana/transaction-confirmation" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" "@stablelib/binary@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" + resolved "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz" integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== dependencies: "@stablelib/int" "^1.0.1" "@stablelib/ed25519@1.0.3": version "1.0.3" - resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" + resolved "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz" integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== dependencies: "@stablelib/random" "^1.0.2" @@ -887,17 +891,17 @@ "@stablelib/hash@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-1.0.1.tgz#3c944403ff2239fad8ebb9015e33e98444058bc5" + resolved "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz" integrity sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg== "@stablelib/int@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" + resolved "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz" integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== "@stablelib/random@^1.0.2": version "1.0.2" - resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" + resolved "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== dependencies: "@stablelib/binary" "^1.0.1" @@ -905,7 +909,7 @@ "@stablelib/sha512@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-1.0.1.tgz#6da700c901c2c0ceacbd3ae122a38ac57c72145f" + resolved "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz" integrity sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw== dependencies: "@stablelib/binary" "^1.0.1" @@ -914,15 +918,15 @@ "@stablelib/wipe@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" + resolved "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== "@swc/helpers@^0.5.11": - version "0.5.13" - resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz" - integrity sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w== + version "0.5.15" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz" + integrity sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g== dependencies: - tslib "^2.4.0" + tslib "^2.8.0" "@types/bn.js@^5.1.0": version "5.1.6" @@ -933,19 +937,12 @@ "@types/chai-as-promised@^7.1.2": version "7.1.8" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" + resolved "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz" integrity sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw== dependencies: "@types/chai" "*" -"@types/chai@*": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.0.1.tgz#2c3705555cf11f5f59c836a84c44afcfe4e5689d" - integrity sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA== - dependencies: - "@types/deep-eql" "*" - -"@types/chai@^4.3.0": +"@types/chai@*", "@types/chai@^4.3.0": version "4.3.20" resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz" integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== @@ -957,19 +954,14 @@ dependencies: "@types/node" "*" -"@types/deep-eql@*": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" - integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== - "@types/estree@^1.0.6": version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== "@types/json-schema@^7.0.15": version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/json5@^0.0.29": @@ -982,25 +974,18 @@ resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz" integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== -"@types/node@*": - version "22.8.1" - resolved "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz" - integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== +"@types/node@*", "@types/node@^22.10.0": + version "22.10.2" + resolved "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== dependencies: - undici-types "~6.19.8" + undici-types "~6.20.0" "@types/node@^12.12.54": version "12.20.55" resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^22.10.0": - version "22.10.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.0.tgz#89bfc9e82496b9c7edea3382583fa94f75896e81" - integrity sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA== - dependencies: - undici-types "~6.20.0" - "@types/uuid@^8.3.4": version "8.3.4" resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" @@ -1014,15 +999,15 @@ "@types/node" "*" "@types/ws@^8.2.2": - version "8.5.12" - resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz" - integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + version "8.5.13" + resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz" + integrity sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA== dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@8.18.2": +"@typescript-eslint/eslint-plugin@^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", "@typescript-eslint/eslint-plugin@^8.18.2", "@typescript-eslint/eslint-plugin@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz#c78e363ab5fe3b21dd1c90d8be9581534417f78e" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz" integrity sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg== dependencies: "@eslint-community/regexpp" "^4.10.0" @@ -1035,9 +1020,9 @@ natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@8.18.2": +"@typescript-eslint/parser@^8.0.0 || ^8.0.0-alpha.0", "@typescript-eslint/parser@^8.18.2", "@typescript-eslint/parser@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.2.tgz#0379a2e881d51d8fcf7ebdfa0dd18eee79182ce2" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz" integrity sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA== dependencies: "@typescript-eslint/scope-manager" "8.18.2" @@ -1048,7 +1033,7 @@ "@typescript-eslint/scope-manager@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz#d193c200d61eb0ddec5987c8e48c9d4e1c0510bd" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz" integrity sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g== dependencies: "@typescript-eslint/types" "8.18.2" @@ -1056,7 +1041,7 @@ "@typescript-eslint/type-utils@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz#5ad07e09002eee237591881df674c1c0c91ca52f" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz" integrity sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA== dependencies: "@typescript-eslint/typescript-estree" "8.18.2" @@ -1066,12 +1051,12 @@ "@typescript-eslint/types@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.2.tgz#5ebad5b384c8aa1c0f86cee1c61bcdbe7511f547" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz" integrity sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ== "@typescript-eslint/typescript-estree@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz#fffb85527f8304e29bfbbdc712f4515da9f8b47c" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz" integrity sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg== dependencies: "@typescript-eslint/types" "8.18.2" @@ -1085,7 +1070,7 @@ "@typescript-eslint/utils@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.2.tgz#a2635f71904a84f9e47fe1b6f65a6d944ff1adf9" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz" integrity sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q== dependencies: "@eslint-community/eslint-utils" "^4.4.0" @@ -1095,7 +1080,7 @@ "@typescript-eslint/visitor-keys@8.18.2": version "8.18.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz#b3e434b701f086b10a7c82416ebc56899d27ef2f" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz" integrity sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw== dependencies: "@typescript-eslint/types" "8.18.2" @@ -1106,27 +1091,19 @@ resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -JSONStream@^1.3.5: - version "1.3.5" - resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - a-sync-waterfall@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" + resolved "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz" integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.14.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.14.0: version "8.14.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== agentkeepalive@^4.5.0: @@ -1138,7 +1115,7 @@ agentkeepalive@^4.5.0: ajv@^6.12.4: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1183,7 +1160,7 @@ arrify@^1.0.0: asap@^2.0.3: version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== assertion-error@^1.1.0: @@ -1193,26 +1170,26 @@ assertion-error@^1.1.0: asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios-oauth-client@^1.5.0: version "1.5.0" - resolved "https://registry.yarnpkg.com/axios-oauth-client/-/axios-oauth-client-1.5.0.tgz#8e5b8aa0c6dd21e9767a96a358ce11c77fe008a3" + resolved "https://registry.npmjs.org/axios-oauth-client/-/axios-oauth-client-1.5.0.tgz" integrity sha512-CFuTfK9KdRnDDR6LQlUJ0GNKUZ3tHRSFdKPM9WqeCtUdcuKDgWt9aDFH7Xl87VpUcfNt5qRVl4iHdayqtXVv7g== dependencies: qs "^6.10.1" axios-token-interceptor@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/axios-token-interceptor/-/axios-token-interceptor-0.2.0.tgz#07e79f01f414c196bc84b07556cc84e02ed676bd" + resolved "https://registry.npmjs.org/axios-token-interceptor/-/axios-token-interceptor-0.2.0.tgz" integrity sha512-la74OEsXBH1IS9yI6p2oTIynPtBzs0PVUSOwOBgFg2kBwTeDqQ+YJ6jaOWxsTYyqJO510OzHTfnzAn3GFuf9xA== dependencies: lock "^1.1.0" axios@^1.6.0, axios@^1.6.7, axios@^1.7.7: version "1.7.9" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + resolved "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz" integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== dependencies: follow-redirects "^1.15.6" @@ -1233,7 +1210,7 @@ base-x@^3.0.2: base-x@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + resolved "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== base64-js@^1.3.1: @@ -1243,7 +1220,7 @@ base64-js@^1.3.1: base64url@3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" + resolved "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== bigint-buffer@^1.1.5: @@ -1255,7 +1232,7 @@ bigint-buffer@^1.1.5: bignumber.js@^9.0.1: version "9.1.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== binary-extensions@^2.0.0: @@ -1294,7 +1271,7 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" @@ -1311,13 +1288,6 @@ browser-stdout@1.3.1: resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -bs58@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" - integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== - dependencies: - base-x "^4.0.0" - bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -1325,9 +1295,16 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" +bs58@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== + dependencies: + base-x "^4.0.0" + buffer-equal-constant-time@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== buffer-from@^1.0.0, buffer-from@^1.1.0: @@ -1340,7 +1317,7 @@ buffer-layout@^1.2.0, buffer-layout@^1.2.2: resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== -buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: +buffer@^6.0.3, buffer@~6.0.3, buffer@6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1355,28 +1332,27 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" -call-bind-apply-helpers@^1.0.1: +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz" integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== dependencies: es-errors "^1.3.0" function-bind "^1.1.2" -call-bind@^1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== dependencies: + call-bind-apply-helpers "^1.0.0" es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" get-intrinsic "^1.2.4" - set-function-length "^1.2.1" + set-function-length "^1.2.2" -call-bound@^1.0.2: +call-bound@^1.0.2, call-bound@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + resolved "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz" integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== dependencies: call-bind-apply-helpers "^1.0.1" @@ -1384,7 +1360,7 @@ call-bound@^1.0.2: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^6.0.0, camelcase@^6.3.0: @@ -1394,17 +1370,17 @@ camelcase@^6.0.0, camelcase@^6.3.0: canonicalize@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-2.0.0.tgz#32be2cef4446d67fd5348027a384cae28f17226a" + resolved "https://registry.npmjs.org/canonicalize/-/canonicalize-2.0.0.tgz" integrity sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w== chai-as-promised@^7.1.2: version "7.1.2" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" + resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz" integrity sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw== dependencies: check-error "^1.0.2" -chai@^4.3.4: +chai@^4.3.4, "chai@>= 2.1.2 < 6": version "4.5.0" resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== @@ -1426,18 +1402,18 @@ chalk@^4.0.0, chalk@^4.1.0: supports-color "^7.1.0" chalk@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" - integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + version "5.4.1" + resolved "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz" + integrity sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== check-error@^1.0.2, check-error@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== dependencies: get-func-name "^2.0.2" -chokidar@3.5.3: +chokidar@^3.3.0, chokidar@3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -1463,7 +1439,7 @@ cliui@^7.0.2: codama@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/codama/-/codama-1.1.0.tgz#7f452b3821bb7589d8ee7a7e55fb62a80e8638b4" + resolved "https://registry.npmjs.org/codama/-/codama-1.1.0.tgz" integrity sha512-dr0iTND6q9goY0CwNmX5tk53iJ/KhziN/js/x2g4Dvl5K6tUGy+iR20yeBYw8lq1rwUDIocOEgKVq/HcKOI9yA== dependencies: "@codama/errors" "1.1.0" @@ -1485,14 +1461,14 @@ color-name@~1.1.4: combined-stream@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" commander@^12.1.0: version "12.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + resolved "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz" integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== commander@^2.20.3: @@ -1502,7 +1478,7 @@ commander@^2.20.3: commander@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== concat-map@0.0.1: @@ -1519,7 +1495,7 @@ cross-fetch@^3.1.5: cross-spawn@^7.0.6: version "7.0.6" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" @@ -1533,19 +1509,19 @@ crypto-hash@^1.3.0: data-uri-to-buffer@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -debug@4.3.3: +debug@^4.3.1, debug@^4.3.2, debug@4.3.3: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" -debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@^4.3.4: version "4.4.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -1557,12 +1533,12 @@ decamelize@^4.0.0: decimal.js@^10.4.3: version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz" integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== decode-uri-component@^0.2.2: version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== deep-eql@^4.1.3: @@ -1574,7 +1550,7 @@ deep-eql@^4.1.3: deep-equal-in-any-order@^2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/deep-equal-in-any-order/-/deep-equal-in-any-order-2.0.6.tgz#9fb208dfc6836e35e2d4c942db85fc291820318a" + resolved "https://registry.npmjs.org/deep-equal-in-any-order/-/deep-equal-in-any-order-2.0.6.tgz" integrity sha512-RfnWHQzph10YrUjvWwhd15Dne8ciSJcZ3U6OD7owPwiVwsdE5IFSoZGg8rlwJD11ES+9H5y8j3fCofviRHOqLQ== dependencies: lodash.mapvalues "^4.6.0" @@ -1582,12 +1558,12 @@ deep-equal-in-any-order@^2.0.6: deep-is@^0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== define-data-property@^1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz" integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: es-define-property "^1.0.0" @@ -1601,12 +1577,12 @@ delay@^5.0.0: delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== did-jwt@^7.0: version "7.4.7" - resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-7.4.7.tgz#44105fb0a0cdfd78c087de52087422075c674700" + resolved "https://registry.npmjs.org/did-jwt/-/did-jwt-7.4.7.tgz" integrity sha512-Apz7nIfIHSKWIMaEP5L/K8xkwByvjezjTG0xiqwKdnNj1x8M0+Yasury5Dm/KPltxi2PlGfRPf3IejRKZrT8mQ== dependencies: "@noble/ciphers" "^0.4.0" @@ -1621,19 +1597,19 @@ did-jwt@^7.0: did-resolver@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.1.0.tgz#740852083c4fd5bf9729d528eca5d105aff45eb6" + resolved "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz" integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - diff@^3.1.0: version "3.5.0" resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + dot-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" @@ -1644,12 +1620,12 @@ dot-case@^3.0.4: dotenv@^16.0.3, dotenv@^16.4.7: version "16.4.7" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz" integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== dunder-proto@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== dependencies: call-bind-apply-helpers "^1.0.1" @@ -1658,7 +1634,7 @@ dunder-proto@^1.0.0: ecdsa-sig-formatter@1.0.11: version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" @@ -1668,26 +1644,19 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-define-property@^1.0.1: +es-define-property@^1.0.0, es-define-property@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-object-atoms@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz" integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== dependencies: es-errors "^1.3.0" @@ -1709,14 +1678,28 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: +escape-string-regexp@^4.0.0, escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-plugin-spellcheck@^0.0.20: + version "0.0.20" + resolved "https://registry.npmjs.org/eslint-plugin-spellcheck/-/eslint-plugin-spellcheck-0.0.20.tgz" + integrity sha512-GJa6vgzWAYqe0elKADAsiBRrhvqBnKyt7tpFSqlCZJsK2W9+K80oMyHhKolA7vJ13H5RCGs5/KCN+mKUyKoAiA== + dependencies: + globals "^13.0.0" + hunspell-spellchecker "^1.0.2" + lodash "^4.17.15" + +eslint-plugin-unused-imports@^4.1.4: + version "4.1.4" + resolved "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz" + integrity sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ== + eslint-scope@^8.2.0: version "8.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz" integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== dependencies: esrecurse "^4.3.0" @@ -1724,17 +1707,17 @@ eslint-scope@^8.2.0: eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint-visitor-keys@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.17.0: +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^8.57.0 || ^9.0.0", "eslint@^9.0.0 || ^8.0.0", eslint@^9.17.0, eslint@>=0.8.0: version "9.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.17.0.tgz#faa1facb5dd042172fdc520106984b5c2421bb0c" + resolved "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz" integrity sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" @@ -1774,7 +1757,7 @@ eslint@^9.17.0: espree@^10.0.1, espree@^10.3.0: version "10.3.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + resolved "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz" integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== dependencies: acorn "^8.14.0" @@ -1783,26 +1766,26 @@ espree@^10.0.1, espree@^10.3.0: esquery@^1.5.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== eventemitter3@^4.0.7: @@ -1822,12 +1805,12 @@ eyes@^0.1.8: fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.3.2: version "3.3.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -1838,12 +1821,12 @@ fast-glob@^3.3.2: fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fast-stable-stringify@^1.0.0: @@ -1851,16 +1834,21 @@ fast-stable-stringify@^1.0.0: resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== +fastestsmallesttextencoderdecoder@^1.0.22: + version "1.0.22" + resolved "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz" + integrity sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw== + fastq@^1.6.0: version "1.18.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.18.0.tgz#d631d7e25faffea81887fe5ea8c9010e1b36fee0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz" integrity sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw== dependencies: reusify "^1.0.4" fetch-blob@^3.1.2, fetch-blob@^3.1.4: version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz" integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== dependencies: node-domexception "^1.0.0" @@ -1868,7 +1856,7 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4: file-entry-cache@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz" integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: flat-cache "^4.0.0" @@ -1887,10 +1875,10 @@ fill-range@^7.1.1: filter-obj@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + resolved "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -find-up@5.0.0, find-up@^5.0.0: +find-up@^5.0.0, find-up@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -1900,7 +1888,7 @@ find-up@5.0.0, find-up@^5.0.0: fireblocks-sdk@^5.35.0: version "5.35.0" - resolved "https://registry.yarnpkg.com/fireblocks-sdk/-/fireblocks-sdk-5.35.0.tgz#210aafa3cd4cdd503e488f25f05273f415f40b43" + resolved "https://registry.npmjs.org/fireblocks-sdk/-/fireblocks-sdk-5.35.0.tgz" integrity sha512-tVLxh832vowYgwNJC0SYZtvfQ9sN9lPHGLmMhfcrvbWDCjZf/mmHq2AYYROrdDqJG7lIcHdjYyyVpJs/JYTaOw== dependencies: "@notabene/pii-sdk" "^1.17.1" @@ -1913,7 +1901,7 @@ fireblocks-sdk@^5.35.0: flat-cache@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz" integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" @@ -1926,17 +1914,17 @@ flat@^5.0.2: flatted@^3.2.9: version "3.3.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz" integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== follow-redirects@^1.15.6: version "1.15.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== form-data@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz" integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== dependencies: asynckit "^0.4.0" @@ -1945,7 +1933,7 @@ form-data@^4.0.0: formdata-polyfill@^4.0.10: version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz" integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== dependencies: fetch-blob "^3.1.2" @@ -1955,14 +1943,9 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== get-caller-file@^2.0.5: @@ -1975,20 +1958,9 @@ get-func-name@^2.0.1, get-func-name@^2.0.2: resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - -get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: +get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: version "1.2.6" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz" integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== dependencies: call-bind-apply-helpers "^1.0.1" @@ -2011,7 +1983,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: glob-parent@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" @@ -2028,26 +2000,26 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" +globals@^13.0.0: + version "13.24.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + globals@^14.0.0: version "14.0.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + resolved "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -gopd@^1.2.0: +gopd@^1.0.1, gopd@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== graphemer@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== growl@1.10.5: @@ -2062,29 +2034,19 @@ has-flag@^4.0.0: has-property-descriptors@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz" integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - has-symbols@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== -hasown@^2.0.0, hasown@^2.0.2: +hasown@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" @@ -2101,6 +2063,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +hunspell-spellchecker@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/hunspell-spellchecker/-/hunspell-spellchecker-1.0.2.tgz" + integrity sha512-4DwmFAvlz+ChsqLDsZT2cwBsYNXh+oWboemxXtafwKIyItq52xfR4e4kr017sLAoPaSYVofSOvPUfmOAhXyYvw== + ieee754@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" @@ -2108,12 +2075,12 @@ ieee754@^1.2.1: ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -2121,7 +2088,7 @@ import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: @@ -2178,7 +2145,7 @@ is-unicode-supported@^0.1.0: isarray@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isexe@^2.0.0: @@ -2192,24 +2159,24 @@ isomorphic-ws@^4.0.1: integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== jayson@^4.1.1: - version "4.1.2" - resolved "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz" - integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + version "4.1.3" + resolved "https://registry.npmjs.org/jayson/-/jayson-4.1.3.tgz" + integrity sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ== dependencies: "@types/connect" "^3.4.33" "@types/node" "^12.12.54" "@types/ws" "^7.4.4" - JSONStream "^1.3.5" commander "^2.20.3" delay "^5.0.0" es6-promisify "^5.0.0" eyes "^0.1.8" isomorphic-ws "^4.0.1" json-stringify-safe "^5.0.1" + JSONStream "^1.3.5" uuid "^8.3.2" ws "^7.5.10" -js-yaml@4.1.0, js-yaml@^4.1.0: +js-yaml@^4.1.0, js-yaml@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -2218,25 +2185,26 @@ js-yaml@4.1.0, js-yaml@^4.1.0: json-buffer@3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stable-stringify@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" - integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + version "1.2.1" + resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz" + integrity sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA== dependencies: - call-bind "^1.0.5" + call-bind "^1.0.8" + call-bound "^1.0.3" isarray "^2.0.5" jsonify "^0.0.1" object-keys "^1.1.1" @@ -2255,7 +2223,7 @@ json5@^1.0.2: jsonify@^0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz" integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== jsonparse@^1.2.0: @@ -2263,10 +2231,18 @@ jsonparse@^1.2.0: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -jsonwebtoken@8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== dependencies: jws "^3.2.2" lodash.includes "^4.3.0" @@ -2277,12 +2253,12 @@ jsonwebtoken@8.5.1: lodash.isstring "^4.0.1" lodash.once "^4.0.0" ms "^2.1.1" - semver "^5.6.0" + semver "^7.5.4" -jsonwebtoken@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" - integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== +jsonwebtoken@8.5.1: + version "8.5.1" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== dependencies: jws "^3.2.2" lodash.includes "^4.3.0" @@ -2293,11 +2269,11 @@ jsonwebtoken@^9.0.2: lodash.isstring "^4.0.1" lodash.once "^4.0.0" ms "^2.1.1" - semver "^7.5.4" + semver "^5.6.0" jwa@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz" integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== dependencies: buffer-equal-constant-time "1.0.1" @@ -2306,7 +2282,7 @@ jwa@^1.4.1: jws@^3.2.2: version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + resolved "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== dependencies: jwa "^1.4.1" @@ -2314,14 +2290,14 @@ jws@^3.2.2: keyv@^4.5.4: version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" levn@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -2336,57 +2312,57 @@ locate-path@^6.0.0: lock@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/lock/-/lock-1.1.0.tgz#53157499d1653b136ca66451071fca615703fa55" + resolved "https://registry.npmjs.org/lock/-/lock-1.1.0.tgz" integrity sha512-NZQIJJL5Rb9lMJ0Yl1JoVr9GSdo4HTPsUEWsSFzB8dE8DSoiLCVavWZPi7Rnlv/o73u6I24S/XYc/NmG4l8EKA== lodash.includes@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz" integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== lodash.isboolean@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== lodash.isinteger@^4.0.4: version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== lodash.isnumber@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== lodash.isstring@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== lodash.mapvalues@^4.6.0: version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + resolved "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.once@^4.0.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== -lodash@^4.17.21: +lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== log-symbols@4.1.0: @@ -2418,17 +2394,17 @@ make-error@^1.1.1: math-intrinsics@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== merge2@^1.3.0: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: version "4.0.8" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" @@ -2436,24 +2412,24 @@ micromatch@^4.0.4: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== +minimatch@^3.0.4: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.4, minimatch@^3.1.2: +minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -2462,11 +2438,18 @@ minimatch@^3.0.4, minimatch@^3.1.2: minimatch@^9.0.4: version "9.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -2479,7 +2462,7 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" -mocha@^9.0.3: +"mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", mocha@^9.0.3: version "9.2.2" resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== @@ -2509,26 +2492,26 @@ mocha@^9.0.3: yargs-parser "20.2.4" yargs-unparser "2.0.0" +ms@^2.0.0, ms@^2.1.1, ms@^2.1.3, ms@2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multibase@4.0.6, multibase@^4.0.6: +multibase@^4.0.6, multibase@4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-4.0.6.tgz#6e624341483d6123ca1ede956208cb821b440559" + resolved "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz" integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ== dependencies: "@multiformats/base-x" "^4.0.1" multicodec@3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-3.2.1.tgz#82de3254a0fb163a107c1aab324f2a91ef51efb2" + resolved "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz" integrity sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw== dependencies: uint8arrays "^3.0.0" @@ -2536,7 +2519,7 @@ multicodec@3.2.1: multiformats@^9.4.2, multiformats@^9.6.2: version "9.9.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + resolved "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz" integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== nanoid@3.3.1: @@ -2546,7 +2529,7 @@ nanoid@3.3.1: natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== no-case@^3.0.4: @@ -2559,7 +2542,7 @@ no-case@^3.0.4: node-domexception@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== node-fetch@^2.6.12, node-fetch@^2.7.0: @@ -2571,7 +2554,7 @@ node-fetch@^2.6.12, node-fetch@^2.7.0: node-fetch@^3.3.1: version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz" integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== dependencies: data-uri-to-buffer "^4.0.0" @@ -2579,9 +2562,9 @@ node-fetch@^3.3.1: formdata-polyfill "^4.0.10" node-gyp-build@^4.3.0: - version "4.8.2" - resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz" - integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== + version "4.8.4" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz" + integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -2590,7 +2573,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: nunjucks@^3.2.4: version "3.2.4" - resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" + resolved "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz" integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== dependencies: a-sync-waterfall "^1.0.0" @@ -2599,12 +2582,12 @@ nunjucks@^3.2.4: object-inspect@^1.13.3: version "1.13.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz" integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== object-keys@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== once@^1.3.0: @@ -2616,7 +2599,7 @@ once@^1.3.0: optionator@^0.9.3: version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" @@ -2647,7 +2630,7 @@ pako@^2.0.3: parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" @@ -2664,7 +2647,7 @@ path-is-absolute@^1.0.0: path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== pathval@^1.1.1: @@ -2677,46 +2660,41 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -platform@1.3.6, platform@^1.3.6: +platform@^1.3.6, platform@1.3.6: version "1.3.6" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" + resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^2.6.2: - version "2.8.8" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - -prettier@^3.3.3: - version "3.4.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.1.tgz#e211d451d6452db0a291672ca9154bc8c2579f7b" - integrity sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg== +prettier@^3.3.3, prettier@^3.4.2: + version "3.4.2" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== proxy-from-env@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== punycode@^2.1.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== qs@^6.10.1, qs@^6.11.0: version "6.13.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" + resolved "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz" integrity sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg== dependencies: side-channel "^1.0.6" query-string@^7.1.3: version "7.1.3" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" + resolved "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz" integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== dependencies: decode-uri-component "^0.2.2" @@ -2726,7 +2704,7 @@ query-string@^7.1.3: queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== randombytes@^2.1.0: @@ -2755,12 +2733,12 @@ require-directory@^2.1.1: resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rpc-websockets@^9.0.2: @@ -2781,7 +2759,7 @@ rpc-websockets@^9.0.2: run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" @@ -2793,12 +2771,12 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0: semver@^5.6.0: version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^7.5.4, semver@^7.6.0: version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== serialize-javascript@6.0.0: @@ -2808,9 +2786,9 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -set-function-length@^1.2.1: +set-function-length@^1.2.2: version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: define-data-property "^1.1.4" @@ -2822,19 +2800,19 @@ set-function-length@^1.2.1: shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== side-channel-list@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + resolved "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz" integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== dependencies: es-errors "^1.3.0" @@ -2842,7 +2820,7 @@ side-channel-list@^1.0.0: side-channel-map@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + resolved "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz" integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== dependencies: call-bound "^1.0.2" @@ -2852,7 +2830,7 @@ side-channel-map@^1.0.1: side-channel-weakmap@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + resolved "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz" integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== dependencies: call-bound "^1.0.2" @@ -2863,7 +2841,7 @@ side-channel-weakmap@^1.0.2: side-channel@^1.0.6: version "1.1.0" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz" integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== dependencies: es-errors "^1.3.0" @@ -2880,34 +2858,25 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -solana-bankrun-darwin-arm64@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-arm64/-/solana-bankrun-darwin-arm64-0.4.0.tgz#eb0f3dfffb1675f6329a1e026b12d09222b33986" - integrity sha512-6dz78Teoz7ez/3lpRLDjktYLJb79FcmJk2me4/YaB8WiO6W43OdExU4h+d2FyuAryO2DgBPXaBoBNY/8J1HJmw== - -solana-bankrun-darwin-universal@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-universal/-/solana-bankrun-darwin-universal-0.4.0.tgz#0ac13ec7637b334b1030e6f51abecc50a254b5de" - integrity sha512-zSSw/Jx3KNU42pPMmrEWABd0nOwGJfsj7nm9chVZ3ae7WQg3Uty0hHAkn5NSDCj3OOiN0py9Dr1l9vmRJpOOxg== - -solana-bankrun-darwin-x64@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-x64/-/solana-bankrun-darwin-x64-0.4.0.tgz#f863c5a668858b7c44be51376bd05fb077c11c99" - integrity sha512-LWjs5fsgHFtyr7YdJR6r0Ho5zrtzI6CY4wvwPXr8H2m3b4pZe6RLIZjQtabCav4cguc14G0K8yQB2PTMuGub8w== +"solana_fireblocks_web3_provider@https://github.com/fireblocks/solana-web3-adapter.git": + version "1.0.0" + resolved "git+ssh://git@github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd" + dependencies: + "@solana/spl-token" "^0.4.6" solana-bankrun-linux-x64-gnu@0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun-linux-x64-gnu/-/solana-bankrun-linux-x64-gnu-0.4.0.tgz#30fd7edaf3ff6585468138d3bed6eaed37878d9e" + resolved "https://registry.npmjs.org/solana-bankrun-linux-x64-gnu/-/solana-bankrun-linux-x64-gnu-0.4.0.tgz" integrity sha512-SrlVrb82UIxt21Zr/XZFHVV/h9zd2/nP25PMpLJVLD7Pgl2yhkhfi82xj3OjxoQqWe+zkBJ+uszA0EEKr67yNw== solana-bankrun-linux-x64-musl@0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun-linux-x64-musl/-/solana-bankrun-linux-x64-musl-0.4.0.tgz#3c870218140b1307dc44b51d2282697c99f2e1e4" + resolved "https://registry.npmjs.org/solana-bankrun-linux-x64-musl/-/solana-bankrun-linux-x64-musl-0.4.0.tgz" integrity sha512-Nv328ZanmURdYfcLL+jwB1oMzX4ZzK57NwIcuJjGlf0XSNLq96EoaO5buEiUTo4Ls7MqqMyLbClHcrPE7/aKyA== solana-bankrun@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/solana-bankrun/-/solana-bankrun-0.4.0.tgz#a48a7a74ce6c56be4ec7e200336026f65e90b8dc" + resolved "https://registry.npmjs.org/solana-bankrun/-/solana-bankrun-0.4.0.tgz" integrity sha512-NMmXUipPBkt8NgnyNO3SCnPERP6xT/AMNMBooljGA3+rG6NN8lmXJsKeLqQTiFsDeWD74U++QM/DgcueSWvrIg== dependencies: "@solana/web3.js" "^1.68.0" @@ -2919,15 +2888,9 @@ solana-bankrun@^0.4.0: solana-bankrun-linux-x64-gnu "0.4.0" solana-bankrun-linux-x64-musl "0.4.0" -"solana_fireblocks_web3_provider@https://github.com/fireblocks/solana-web3-adapter.git": - version "1.0.0" - resolved "https://github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd" - dependencies: - "@solana/spl-token" "^0.4.6" - sort-any@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-any/-/sort-any-2.0.0.tgz#62a5409c9905c9483f03e41e17f46cc451aa7c55" + resolved "https://registry.npmjs.org/sort-any/-/sort-any-2.0.0.tgz" integrity sha512-T9JoiDewQEmWcnmPn/s9h/PH9t3d/LSWi0RgVmXSuDYeZXTZOZ1/wrK2PHaptuR1VXe3clLLt0pD6sgVOwjNEA== dependencies: lodash "^4.17.21" @@ -2947,12 +2910,12 @@ source-map@^0.6.0: split-on-first@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + resolved "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz" integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== strict-uri-encode@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== string-width@^4.1.0, string-width@^4.2.0: @@ -2976,7 +2939,7 @@ strip-bom@^3.0.0: resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@3.1.1, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1, strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -2991,13 +2954,6 @@ superstruct@^2.0.2: resolved "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz" integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" @@ -3005,6 +2961,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" @@ -3034,7 +2997,7 @@ tr46@~0.0.3: ts-api-utils@^1.3.0: version "1.4.3" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz" integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== ts-mocha@^10.0.0: @@ -3070,24 +3033,19 @@ tsconfig-paths@^3.5.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.0.3, tslib@^2.4.0: +tslib@^2.0.3, tslib@^2.5.0, tslib@^2.8.0: version "2.8.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz" integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== -tslib@^2.5.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" - integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== - tslog@^4.9.3: version "4.9.3" - resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.9.3.tgz#d4167d5f51748bdeab593945bc2d8f9827ea0dba" + resolved "https://registry.npmjs.org/tslog/-/tslog-4.9.3.tgz" integrity sha512-oDWuGVONxhVEBtschLf2cs/Jy8i7h1T+CpdkTNWQgdAF7DhRo2G8vMCgILKe7ojdEkLhICWgI1LYSSKaJsRgcw== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" @@ -3097,74 +3055,74 @@ type-detect@^4.0.0, type-detect@^4.1.0: resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + typescript-eslint@^8.18.2: version "8.18.2" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.18.2.tgz#71334dcf843adc3fbb771dce5ade7876aa0d62b7" + resolved "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.2.tgz" integrity sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ== dependencies: "@typescript-eslint/eslint-plugin" "8.18.2" "@typescript-eslint/parser" "8.18.2" "@typescript-eslint/utils" "8.18.2" -typescript@^5.7.2: +typescript@^5.7.2, typescript@>=4.2.0, "typescript@>=4.8.4 <5.8.0", typescript@>=5: version "5.7.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz" integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== -uint8arrays@3.1.1, uint8arrays@^3.0.0: +uint8arrays@^3.0.0, uint8arrays@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + resolved "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== dependencies: multiformats "^9.4.2" undici-types@^6.20.0: version "6.21.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz" integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== -undici-types@~6.19.8: - version "6.19.8" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== - undici-types@~6.20.0: version "6.20.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz" integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" -utf-8-validate@^5.0.2: +utf-8-validate@^5.0.2, utf-8-validate@>=5.0.2: version "5.0.10" resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== dependencies: node-gyp-build "^4.3.0" -uuid@8.3.2, uuid@^8.3.2: +uuid@^8.3.2, uuid@8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^9.0.0: version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== varint@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" + resolved "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== web-streams-polyfill@^3.0.3: version "3.3.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== webidl-conversions@^3.0.0: @@ -3180,7 +3138,7 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@2.0.2, which@^2.0.1: +which@^2.0.1, which@2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -3189,7 +3147,7 @@ which@2.0.2, which@^2.0.1: word-wrap@^1.2.5: version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== workerpool@6.2.0: @@ -3211,31 +3169,31 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@*, ws@^8.18.0, ws@^8.5.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + ws@^7.5.10: version "7.5.10" resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.5.0: - version "8.18.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" From b3bf1658d78f87d8fcbedb1137e6d3837d21575e Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Tue, 24 Dec 2024 06:26:25 -0700 Subject: [PATCH 10/21] More spelling errors and minor fixes --- solana-examples/hello-world/host/receipt.json | 358 ------------------ solana-examples/hello-world/host/src/main.rs | 31 +- solana-examples/hello-world/receipt.json | 358 ------------------ solana-examples/hello-world/vp.json | 10 - .../programs/solana-examples/src/lib.rs | 10 +- solana-ownable/ownable/src/lib.rs | 2 +- .../programs/groth_16_verifier/src/lib.rs | 2 +- .../programs/test_bad_verifier/src/lib.rs | 2 +- .../programs/verifier_router/src/estop/mod.rs | 4 +- .../programs/verifier_router/src/lib.rs | 3 +- .../verifier_router/src/router/mod.rs | 4 +- 11 files changed, 21 insertions(+), 763 deletions(-) delete mode 100644 solana-examples/hello-world/host/receipt.json delete mode 100644 solana-examples/hello-world/receipt.json delete mode 100644 solana-examples/hello-world/vp.json diff --git a/solana-examples/hello-world/host/receipt.json b/solana-examples/hello-world/host/receipt.json deleted file mode 100644 index 9ceff1e..0000000 --- a/solana-examples/hello-world/host/receipt.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "inner": { - "Groth16": { - "seal": [ - 33, - 172, - 220, - 128, - 50, - 141, - 222, - 67, - 47, - 88, - 252, - 173, - 175, - 66, - 162, - 62, - 206, - 117, - 104, - 215, - 46, - 76, - 221, - 87, - 9, - 99, - 73, - 230, - 53, - 50, - 172, - 10, - 20, - 116, - 126, - 105, - 254, - 96, - 120, - 51, - 126, - 211, - 107, - 156, - 71, - 198, - 39, - 56, - 23, - 102, - 155, - 117, - 35, - 180, - 183, - 127, - 89, - 69, - 223, - 207, - 252, - 172, - 12, - 155, - 24, - 166, - 244, - 166, - 90, - 125, - 206, - 243, - 210, - 141, - 213, - 36, - 156, - 129, - 77, - 232, - 134, - 0, - 83, - 247, - 3, - 250, - 192, - 122, - 49, - 28, - 251, - 204, - 146, - 239, - 1, - 106, - 47, - 99, - 53, - 236, - 213, - 220, - 204, - 236, - 238, - 184, - 76, - 198, - 8, - 34, - 84, - 37, - 30, - 73, - 33, - 105, - 227, - 246, - 254, - 108, - 138, - 187, - 240, - 198, - 170, - 116, - 134, - 29, - 32, - 147, - 61, - 122, - 239, - 96, - 40, - 61, - 180, - 139, - 112, - 156, - 87, - 122, - 223, - 28, - 233, - 107, - 16, - 196, - 167, - 219, - 44, - 134, - 52, - 137, - 33, - 232, - 69, - 166, - 70, - 32, - 2, - 146, - 78, - 52, - 70, - 183, - 19, - 18, - 176, - 21, - 45, - 22, - 93, - 71, - 199, - 191, - 131, - 228, - 97, - 219, - 216, - 99, - 205, - 155, - 158, - 202, - 187, - 92, - 180, - 229, - 213, - 211, - 46, - 26, - 167, - 9, - 106, - 218, - 243, - 105, - 91, - 121, - 12, - 88, - 83, - 247, - 1, - 222, - 125, - 200, - 224, - 183, - 255, - 65, - 21, - 130, - 120, - 88, - 97, - 11, - 163, - 67, - 170, - 62, - 31, - 35, - 239, - 228, - 133, - 99, - 185, - 76, - 185, - 202, - 113, - 118, - 75, - 39, - 8, - 90, - 34, - 111, - 134, - 49, - 163, - 60, - 17, - 64, - 116, - 170, - 115, - 210, - 30, - 44, - 159, - 69 - ], - "claim": { - "Value": { - "pre": { - "Value": { - "pc": 2103824, - "merkle_root": [ - 3008558704, - 1457383356, - 2793242498, - 288622768, - 665521633, - 1423012114, - 3129177026, - 3398154412 - ] - } - }, - "post": { - "Value": { - "pc": 0, - "merkle_root": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - } - }, - "exit_code": { - "Halted": 0 - }, - "input": { - "Pruned": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - "output": { - "Value": { - "journal": { - "Value": [ - 15, - 0, - 0, - 0 - ] - }, - "assumptions": { - "Value": [] - } - } - } - } - }, - "verifier_parameters": [ - 1763163472, - 2876521993, - 3272685530, - 2018367509, - 394453731, - 2734973759, - 718893618, - 4111358395 - ] - } - }, - "journal": { - "bytes": [ - 15, - 0, - 0, - 0 - ] - }, - "metadata": { - "verifier_parameters": [ - 1763163472, - 2876521993, - 3272685530, - 2018367509, - 394453731, - 2734973759, - 718893618, - 4111358395 - ] - } -} \ No newline at end of file diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index 38590b5..76e6f9d 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -1,9 +1,5 @@ -use anchor_client::anchor_lang::accounts::program; use anchor_client::anchor_lang::system_program::ID as SYSTEM_PROGRAM_ID; -use anchor_client::anchor_lang::Key; -use anchor_client::solana_client::{ - nonblocking::rpc_client::RpcClient, rpc_config::RpcRequestAirdropConfig, -}; +use anchor_client::solana_client::rpc_config::RpcRequestAirdropConfig; use anchor_client::solana_sdk::{ commitment_config::{CommitmentConfig, CommitmentLevel}, pubkey::Pubkey, @@ -12,21 +8,14 @@ use anchor_client::Program; // These constants represent the RISC-V ELF and the image ID generated by risc0-build. // The ELF is used for proving and the ID is used for verification. use anchor_client::{ - solana_sdk::{signature::Keypair, signer::Signer, system_program}, + solana_sdk::{signature::Keypair, signer::Signer}, Client, Cluster, }; use groth_16_verifier::client::receipt_to_proof; -use groth_16_verifier::Proof; use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; -use risc0_zkvm::{default_prover, sha::Digestible, ExecutorEnv, ProverOpts}; -use solana_program::pubkey; -use std::borrow::Borrow; -use std::fs::File; -use std::io::{self, Write}; +use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts}; use std::sync::Arc; -use tokio::time::Sleep; -use tracing::instrument::WithSubscriber; -use tracing::{debug, error, info, trace}; +use tracing::{debug, info, trace}; use solana_examples::{accounts, instruction, ProgramData}; @@ -43,8 +32,6 @@ fn convert_array(input: [u32; 8]) -> [u8; 32] { async fn init(user: Arc, example_program: &PROGRAM, program_data_address: Pubkey) { info!("Attempting to initilize program data"); - let rpc = example_program.async_rpc(); - example_program .request() .accounts(accounts::Initialize { @@ -60,7 +47,7 @@ async fn init(user: Arc, example_program: &PROGRAM, program_data_addres .signer(&user) .send() .await - .expect("Was unable to submit the initilization transaction"); + .expect("Was unable to submit the initialization transaction"); info!("Transaction Successful, our program is initialized and now ready for verifying proofs"); } @@ -98,7 +85,7 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) let receipt = prove_info.receipt; - info!("Groth 16 proof for nonce increment transaction successfuly created, submitting transaction to the program."); + info!("Groth 16 proof for nonce increment transaction successfully created, submitting transaction to the program."); let groth16_receipt = receipt .inner @@ -137,7 +124,7 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) .await .expect("Unable to send increment nonce transaction"); - info!("Transaction succesfull, nonce incremented"); + info!("Transaction successfully, nonce incremented"); } #[tokio::main] @@ -203,11 +190,11 @@ async fn main() { tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; } - // Check if the contract has been initilized yet + // Check if the contract has been initialized yet let program_data: Result = example_program.account(program_data_address).await; if program_data.is_err() { - info!("Could not find program data account, could be first run, initilizing program!"); + info!("Could not find program data account, could be first run, initializing program!"); init(user, &example_program, program_data_address).await; } increment_nonce(example_program, program_data_address).await diff --git a/solana-examples/hello-world/receipt.json b/solana-examples/hello-world/receipt.json deleted file mode 100644 index 740e6e3..0000000 --- a/solana-examples/hello-world/receipt.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "inner": { - "Groth16": { - "seal": [ - 46, - 108, - 62, - 69, - 129, - 2, - 38, - 170, - 178, - 242, - 175, - 27, - 228, - 203, - 244, - 11, - 105, - 253, - 2, - 159, - 39, - 94, - 39, - 47, - 6, - 100, - 58, - 184, - 206, - 183, - 174, - 125, - 47, - 182, - 92, - 99, - 224, - 169, - 181, - 186, - 36, - 131, - 148, - 47, - 187, - 55, - 140, - 94, - 215, - 73, - 121, - 203, - 42, - 162, - 180, - 235, - 111, - 214, - 249, - 182, - 22, - 7, - 150, - 186, - 40, - 102, - 203, - 44, - 248, - 159, - 174, - 190, - 114, - 120, - 55, - 238, - 180, - 114, - 178, - 111, - 144, - 163, - 67, - 157, - 8, - 103, - 37, - 248, - 188, - 89, - 91, - 153, - 144, - 13, - 46, - 161, - 30, - 106, - 9, - 215, - 93, - 11, - 48, - 154, - 128, - 10, - 196, - 81, - 213, - 119, - 123, - 190, - 222, - 68, - 114, - 78, - 52, - 195, - 148, - 37, - 114, - 72, - 249, - 117, - 83, - 16, - 204, - 140, - 4, - 241, - 121, - 231, - 88, - 2, - 227, - 108, - 147, - 221, - 122, - 248, - 130, - 249, - 40, - 127, - 163, - 153, - 178, - 196, - 56, - 158, - 124, - 227, - 68, - 73, - 211, - 78, - 0, - 92, - 134, - 252, - 1, - 116, - 185, - 185, - 217, - 2, - 233, - 129, - 126, - 175, - 66, - 234, - 112, - 33, - 143, - 131, - 138, - 172, - 245, - 0, - 106, - 164, - 79, - 138, - 42, - 188, - 93, - 69, - 29, - 144, - 100, - 73, - 21, - 172, - 3, - 20, - 142, - 135, - 216, - 205, - 30, - 146, - 179, - 114, - 154, - 181, - 106, - 251, - 111, - 33, - 198, - 92, - 10, - 218, - 157, - 113, - 97, - 124, - 169, - 147, - 9, - 128, - 178, - 7, - 46, - 28, - 120, - 50, - 84, - 253, - 74, - 96, - 13, - 4, - 84, - 226, - 241, - 59, - 63, - 184, - 61, - 217, - 70, - 37, - 219, - 233, - 137, - 69, - 12, - 226, - 0, - 51, - 19, - 132, - 4, - 178 - ], - "claim": { - "Value": { - "pre": { - "Value": { - "pc": 2103824, - "merkle_root": [ - 3008558704, - 1457383356, - 2793242498, - 288622768, - 665521633, - 1423012114, - 3129177026, - 3398154412 - ] - } - }, - "post": { - "Value": { - "pc": 0, - "merkle_root": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - } - }, - "exit_code": { - "Halted": 0 - }, - "input": { - "Pruned": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - "output": { - "Value": { - "journal": { - "Value": [ - 1, - 0, - 0, - 0 - ] - }, - "assumptions": { - "Value": [] - } - } - } - } - }, - "verifier_parameters": [ - 1763163472, - 2876521993, - 3272685530, - 2018367509, - 394453731, - 2734973759, - 718893618, - 4111358395 - ] - } - }, - "journal": { - "bytes": [ - 1, - 0, - 0, - 0 - ] - }, - "metadata": { - "verifier_parameters": [ - 1763163472, - 2876521993, - 3272685530, - 2018367509, - 394453731, - 2734973759, - 718893618, - 4111358395 - ] - } -} \ No newline at end of file diff --git a/solana-examples/hello-world/vp.json b/solana-examples/hello-world/vp.json deleted file mode 100644 index 3ef2904..0000000 --- a/solana-examples/hello-world/vp.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - 1763163472, - 2876521993, - 3272685530, - 2018367509, - 394453731, - 2734973759, - 718893618, - 4111358395 -] \ No newline at end of file diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index 72f392d..c17bbe7 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -1,7 +1,7 @@ use anchor_lang::prelude::*; use verifier_router::cpi::accounts::Verify; use verifier_router::program::VerifierRouter as VerifierRouterProgram; -use verifier_router::router::{Groth16Verifier, Proof, PublicInputs, VerificationKey}; +use verifier_router::router::Proof; use verifier_router::state::{VerifierEntry, VerifierRouter}; declare_id!("C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo"); @@ -14,8 +14,8 @@ pub mod solana_examples { /// This allows us to initialize our program by setting the selector of the Risc0 Router to use for /// proofs, the image_id of our own example program, and by setting the default value for our internal - /// nonce. We may want to allow chanigng the selector so that we can use different verifiers in the future. - /// The image ID is tightly coupled with our guest program and prevents a user from changing the offchain + /// nonce. We may want to allow changing the selector so that we can use different verifiers in the future. + /// The image ID is tightly coupled with our guest program and prevents a user from changing the off-chain /// executable code and still getting a valid transaction. pub fn initialize(ctx: Context, selector: u32, image_id: [u8; 32]) -> Result<()> { ctx.accounts.program_data.selector = selector; @@ -28,7 +28,7 @@ pub mod solana_examples { /// it takes a proof that someone has run our off chain program for the next nonce value. /// If the input they gave the off chain program was for an earlier or later nonce, /// the on chain program rejects the transaction. If it the proof is for incrementing to - /// the next nonce it accepts the transaciton. + /// the next nonce it accepts the transaction. pub fn increment_nonce( ctx: Context, proof: Proof, @@ -66,7 +66,7 @@ pub mod solana_examples { // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although - // behaviour would be the same if I ignored the result. + // behavior would be the same if I ignored the result. verifier_router::cpi::verify(cpi_ctx, selector, proof, image_id, journal_digest).unwrap(); // If we reached this line it means that our proof was valid and we modify the program state as appropriate diff --git a/solana-ownable/ownable/src/lib.rs b/solana-ownable/ownable/src/lib.rs index 9ce5515..cacd03b 100644 --- a/solana-ownable/ownable/src/lib.rs +++ b/solana-ownable/ownable/src/lib.rs @@ -35,7 +35,7 @@ pub enum OwnableError { #[msg("Not the current owner")] NotOwner, - /// This error occurs when the owner of a contract attempts to inititate a transfer + /// This error occurs when the owner of a contract attempts to initiate a transfer /// to themselves. #[msg("Cannot transfer ownership to yourself")] CannotTransferToSelf, diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index f35711e..e92d681 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -224,7 +224,7 @@ pub mod client { use super::Proof; use crate::BASE_FIELD_MODULUS_Q; use num_bigint::BigUint; - use risc0_zkvm::{Groth16Receipt, Groth16Seal, ReceiptClaim}; + use risc0_zkvm::{Groth16Receipt, ReceiptClaim}; pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], ()> { let x = &point[..32]; diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs index 9d42577..e05cc92 100644 --- a/solana-verifier/programs/test_bad_verifier/src/lib.rs +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -1,6 +1,6 @@ use anchor_lang::prelude::*; use anchor_lang::system_program; -use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; +use groth_16_verifier::Proof; declare_id!("AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r"); diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs index d3ac89d..78b205d 100644 --- a/solana-verifier/programs/verifier_router/src/estop/mod.rs +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -136,12 +136,12 @@ pub fn emergency_stop_with_proof( ) -> Result<()> { let zero_array = [0u8; 32]; - msg!("Emeregency Stop With Proof Reached!"); + msg!("Emergency Stop With Proof Reached!"); require!( image_id == zero_array && journal_digest == zero_array, EstopError::InvalidProofOfExploit ); - msg!("Proof requierements Passed!"); + msg!("Proof requirements Passed!"); // Attempt to verify the proof let verifier_program = ctx.accounts.verifier_program.to_account_info(); diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 80fcbb1..da10a44 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -1,5 +1,5 @@ use anchor_lang::prelude::*; -use groth_16_verifier::{Proof, PublicInputs, VerificationKey}; +use groth_16_verifier::Proof; pub mod estop; pub mod router; @@ -13,7 +13,6 @@ use state::*; declare_id!("DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa"); #[program] pub mod verifier_router { - use ownable::OwnableError; use state::VerifierRouter; use super::*; diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs index f664af8..5567591 100644 --- a/solana-verifier/programs/verifier_router/src/router/mod.rs +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -110,7 +110,7 @@ pub struct Verify<'info> { )] pub verifier_program: UncheckedAccount<'info>, - /// CHECK: Only included to staisfy Anchor CPI requirements + /// CHECK: Only included to satisfy Anchor CPI requirements pub system_program: Program<'info, System> } @@ -178,8 +178,6 @@ pub fn verify( image_id: [u8; 32], journal_digest: [u8; 32], ) -> Result<()> { - let verifier = &ctx.accounts.verifier_entry; - let verifier_program = ctx.accounts.verifier_program.to_account_info(); let verifier_accounts = VerifyProof { system_program: ctx.accounts.system_program.to_account_info(), From c7690cfaa3143550de1513bb8e6e59d0c60ddc0a Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Thu, 26 Dec 2024 20:32:53 -0700 Subject: [PATCH 11/21] Fixed up typos. Cleaned out unused files. --- solana-verifier/.eslintignore.swp | Bin 4096 -> 12288 bytes solana-verifier/idl/loader-v4.json | 186 --------------- .../programs/groth_16_verifier/src/events.rs | 0 .../programs/groth_16_verifier/src/state.rs | 0 .../test/data/claim_digest.bin | 1 - .../test/data/compressed_proof.bin | Bin 128 -> 0 bytes .../test/data/r0_test_vk.json | 75 ------ .../groth_16_verifier/test/data/receipt.json | 60 ----- solana-verifier/scripts/codma.ts | 6 +- solana-verifier/scripts/loaderV4/index.ts | 10 - .../scripts/loaderV4/instructions/deploy.ts | 198 ---------------- .../scripts/loaderV4/instructions/finalize.ts | 193 ---------------- .../scripts/loaderV4/instructions/index.ts | 14 -- .../scripts/loaderV4/instructions/retract.ts | 169 -------------- .../instructions/transferAuthority.ts | 200 ---------------- .../scripts/loaderV4/instructions/truncate.ts | 217 ------------------ .../scripts/loaderV4/instructions/write.ts | 198 ---------------- .../scripts/loaderV4/programs/index.ts | 9 - .../programs/solanaLoaderV4Program.ts | 83 ------- .../scripts/loaderV4/shared/index.ts | 164 ------------- solana-verifier/tests/router-verifier.ts | 46 ++-- 21 files changed, 23 insertions(+), 1806 deletions(-) delete mode 100644 solana-verifier/idl/loader-v4.json delete mode 100644 solana-verifier/programs/groth_16_verifier/src/events.rs delete mode 100644 solana-verifier/programs/groth_16_verifier/src/state.rs delete mode 100644 solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin delete mode 100644 solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin delete mode 100644 solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json delete mode 100644 solana-verifier/programs/groth_16_verifier/test/data/receipt.json delete mode 100644 solana-verifier/scripts/loaderV4/index.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/deploy.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/finalize.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/index.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/retract.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/truncate.ts delete mode 100644 solana-verifier/scripts/loaderV4/instructions/write.ts delete mode 100644 solana-verifier/scripts/loaderV4/programs/index.ts delete mode 100644 solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts delete mode 100644 solana-verifier/scripts/loaderV4/shared/index.ts diff --git a/solana-verifier/.eslintignore.swp b/solana-verifier/.eslintignore.swp index 3987a4cdcbb86cbaccceefac0ac05ec97c99f53e..89ebca69720072a31740ba1312c31b4507eaf2f2 100644 GIT binary patch delta 129 zcmZorXh>KfpjcAC$WYI~z`z8=AONEoAzTK=&5SJnxi<^2JYZHzOkrR+%+J8^7>F4J k5Nba{#qROL6z^kJ%*#(n1>yMI{FKt1)M9-G6rL6X0IvQVSpWb4 delta 6 NcmZojXi!)n000P<0xYdXyK(mPo iW7c{hx7@&jyBZ^}#l6{L^f8;yB;1BbYoapb7FxfzKtt~U diff --git a/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json deleted file mode 100644 index 087fc9f..0000000 --- a/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "protocol": "groth16", - "curve": "bn128", - "nPublic": 5, - "vk_alpha_1": [ - "20491192805390485299153009773594534940189261866228447918068658471970481763042", - "9383485363053290200918347156157836566562967994039712273449902621266178545958", - "1" - ], - "vk_beta_2": [ - [ - "6375614351688725206403948262868962793625744043794305715222011528459656738731", - "4252822878758300859123897981450591353533073413197771768651442665752259397132" - ], - [ - "10505242626370262277552901082094356697409835680220590971873171140371331206856", - "21847035105528745403288232691147584728191162732299865338377159692350059136679" - ], - ["1", "0"] - ], - "vk_gamma_2": [ - [ - "10857046999023057135944570762232829481370756359578518086990519993285655852781", - "11559732032986387107991004021392285783925812861821192530917403151452391805634" - ], - [ - "8495653923123431417604973247489272438418190587263600148770280649306958101930", - "4082367875863433681332203403145435568316851327593401208105741076214120093531" - ], - ["1", "0"] - ], - "vk_delta_2": [ - [ - "12043754404802191763554326994664886008979042643626290185762540825416902247219", - "1668323501672964604911431804142266013250380587483576094566949227275849579036" - ], - [ - "13740680757317479711909903993315946540841369848973133181051452051592786724563", - "7710631539206257456743780535472368339139328733484942210876916214502466455394" - ], - ["1", "0"] - ], - "IC": [ - [ - "8446592859352799428420270221449902464741693648963397251242447530457567083492", - "1064796367193003797175961162477173481551615790032213185848276823815288302804", - "1" - ], - [ - "3179835575189816632597428042194253779818690147323192973511715175294048485951", - "20895841676865356752879376687052266198216014795822152491318012491767775979074", - "1" - ], - [ - "5332723250224941161709478398807683311971555792614491788690328996478511465287", - "21199491073419440416471372042641226693637837098357067793586556692319371762571", - "1" - ], - [ - "12457994489566736295787256452575216703923664299075106359829199968023158780583", - "19706766271952591897761291684837117091856807401404423804318744964752784280790", - "1" - ], - [ - "19617808913178163826953378459323299110911217259216006187355745713323154132237", - "21663537384585072695701846972542344484111393047775983928357046779215877070466", - "1" - ], - [ - "6834578911681792552110317589222010969491336870276623105249474534788043166867", - "15060583660288623605191393599883223885678013570733629274538391874953353488393", - "1" - ] - ] -} diff --git a/solana-verifier/programs/groth_16_verifier/test/data/receipt.json b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json deleted file mode 100644 index 8f27114..0000000 --- a/solana-verifier/programs/groth_16_verifier/test/data/receipt.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "inner": { - "Groth16": { - "seal": [ - 18, 199, 42, 227, 237, 14, 167, 107, 215, 25, 6, 35, 164, 139, 235, 28, - 253, 182, 155, 61, 145, 90, 12, 230, 43, 159, 103, 10, 123, 79, 109, 0, - 1, 236, 69, 103, 95, 153, 253, 99, 157, 27, 32, 247, 1, 35, 212, 131, - 146, 22, 49, 99, 35, 153, 243, 81, 234, 19, 140, 84, 237, 221, 208, 250, - 21, 15, 249, 251, 221, 127, 250, 120, 24, 136, 126, 63, 83, 112, 253, - 203, 179, 13, 195, 119, 39, 201, 148, 97, 110, 151, 241, 150, 157, 240, - 222, 253, 47, 122, 83, 181, 150, 53, 91, 237, 67, 191, 254, 57, 154, - 114, 44, 173, 221, 220, 161, 239, 63, 212, 180, 122, 116, 234, 157, 211, - 53, 64, 179, 137, 16, 95, 31, 49, 232, 147, 239, 45, 8, 129, 139, 171, - 214, 9, 185, 109, 144, 239, 225, 224, 20, 102, 45, 237, 57, 49, 253, 88, - 180, 30, 25, 78, 40, 134, 115, 250, 77, 255, 75, 45, 123, 90, 169, 188, - 127, 67, 69, 147, 23, 186, 216, 139, 188, 179, 106, 186, 34, 222, 232, - 214, 124, 3, 166, 101, 10, 99, 214, 122, 33, 183, 220, 192, 130, 187, - 26, 35, 175, 197, 189, 217, 98, 244, 49, 155, 207, 36, 220, 134, 72, - 107, 162, 50, 228, 22, 90, 191, 3, 251, 182, 141, 20, 55, 85, 188, 51, - 89, 196, 185, 98, 253, 35, 75, 121, 175, 140, 251, 58, 175, 162, 21, 32, - 77, 211, 137, 214, 155, 141, 114 - ], - "claim": { - "Value": { - "pre": { - "Value": { - "pc": 2105720, - "merkle_root": [ - 4224411480, 845866751, 2644154475, 3950497875, 173122336, - 1840638066, 2988445566, 2047025840 - ] - } - }, - "post": { - "Value": { "pc": 0, "merkle_root": [0, 0, 0, 0, 0, 0, 0, 0] } - }, - "exit_code": { "Halted": 0 }, - "input": { "Pruned": [0, 0, 0, 0, 0, 0, 0, 0] }, - "output": { - "Value": { - "journal": { "Value": [1, 0, 0, 120] }, - "assumptions": { "Value": [] } - } - } - } - }, - "verifier_parameters": [ - 1763163472, 2876521993, 3272685530, 2018367509, 394453731, 2734973759, - 718893618, 4111358395 - ] - } - }, - "journal": { "bytes": [1, 0, 0, 120] }, - "metadata": { - "verifier_parameters": [ - 1763163472, 2876521993, 3272685530, 2018367509, 394453731, 2734973759, - 718893618, 4111358395 - ] - } -} diff --git a/solana-verifier/scripts/codma.ts b/solana-verifier/scripts/codma.ts index 3c18d24..61209c0 100644 --- a/solana-verifier/scripts/codma.ts +++ b/solana-verifier/scripts/codma.ts @@ -7,25 +7,21 @@ import path from "node:path"; const routerIdlPath = path.normalize("../target/idl/verifier_router.json"); const grothIdlPath = path.normalize("../target/idl/groth_16_verifier.json"); const badVerifierIdlPath = path.normalize( - "../target/idl/test_bad_verifier.json", + "../target/idl/test_bad_verifier.json" ); const loaderV3IdlPath = path.normalize("../idl/loader-v3.json"); -const loaderV4IdlPath = path.normalize("../idl/loader-v4.json"); const routerIdl = require(routerIdlPath); const grothIdl = require(grothIdlPath); const badVerifierIdl = require(badVerifierIdlPath); const loaderV3Idl = require(loaderV3IdlPath); -const loaderV4Idl = require(loaderV4IdlPath); const routerCodama = createFromRoot(rootNodeFromAnchor(routerIdl)); const grothCodama = createFromRoot(rootNodeFromAnchor(grothIdl)); const badVerifierCodama = createFromRoot(rootNodeFromAnchor(badVerifierIdl)); const loaderV3Codama = createFromRoot(rootNodeFromAnchor(loaderV3Idl)); -const loaderV4Codama = createFromRoot(rootNodeFromAnchor(loaderV4Idl)); routerCodama.accept(renderJavaScriptVisitor("./scripts/verify-router")); grothCodama.accept(renderJavaScriptVisitor("./scripts/groth16")); badVerifierCodama.accept(renderJavaScriptVisitor("./scripts/bad-verifier")); loaderV3Codama.accept(renderJavaScriptVisitor("./scripts/loaderV3")); -loaderV4Codama.accept(renderJavaScriptVisitor("./scripts/loaderV4")); diff --git a/solana-verifier/scripts/loaderV4/index.ts b/solana-verifier/scripts/loaderV4/index.ts deleted file mode 100644 index d69c576..0000000 --- a/solana-verifier/scripts/loaderV4/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -export * from './instructions'; -export * from './programs'; diff --git a/solana-verifier/scripts/loaderV4/instructions/deploy.ts b/solana-verifier/scripts/loaderV4/instructions/deploy.ts deleted file mode 100644 index 2bef413..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/deploy.ts +++ /dev/null @@ -1,198 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlySignerAccount, - type TransactionSigner, - type WritableAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const DEPLOY_DISCRIMINATOR = 2; - -export function getDeployDiscriminatorBytes() { - return getU8Encoder().encode(DEPLOY_DISCRIMINATOR); -} - -export type DeployInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountAuthority extends string | IAccountMeta = string, - TAccountSource extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableAccount - : TAccountProgram, - TAccountAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountAuthority, - TAccountSource extends string - ? WritableAccount - : TAccountSource, - ...TRemainingAccounts, - ] - >; - -export type DeployInstructionData = { discriminator: number }; - -export type DeployInstructionDataArgs = {}; - -export function getDeployInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: DEPLOY_DISCRIMINATOR }) - ); -} - -export function getDeployInstructionDataDecoder(): Decoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); -} - -export function getDeployInstructionDataCodec(): Codec< - DeployInstructionDataArgs, - DeployInstructionData -> { - return combineCodec( - getDeployInstructionDataEncoder(), - getDeployInstructionDataDecoder() - ); -} - -export type DeployInput< - TAccountProgram extends string = string, - TAccountAuthority extends string = string, - TAccountSource extends string = string, -> = { - /** Program account to deploy. */ - program: Address; - /** Program authority. */ - authority: TransactionSigner; - /** Undeployed source program account to take data and lamports from (optional). */ - source?: Address; -}; - -export function getDeployInstruction< - TAccountProgram extends string, - TAccountAuthority extends string, - TAccountSource extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: DeployInput, - config?: { programAddress?: TProgramAddress } -): DeployInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountSource -> { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - authority: { value: input.authority ?? null, isWritable: false }, - source: { value: input.source ?? null, isWritable: true }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.authority), - getAccountMeta(accounts.source), - ], - programAddress, - data: getDeployInstructionDataEncoder().encode({}), - } as DeployInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountSource - >; - - return instruction; -} - -export type ParsedDeployInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to deploy. */ - program: TAccountMetas[0]; - /** Program authority. */ - authority: TAccountMetas[1]; - /** Undeployed source program account to take data and lamports from (optional). */ - source?: TAccountMetas[2] | undefined; - }; - data: DeployInstructionData; -}; - -export function parseDeployInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedDeployInstruction { - if (instruction.accounts.length < 3) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - authority: getNextAccount(), - source: getNextOptionalAccount(), - }, - data: getDeployInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/instructions/finalize.ts b/solana-verifier/scripts/loaderV4/instructions/finalize.ts deleted file mode 100644 index a2505d8..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/finalize.ts +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlyAccount, - type ReadonlySignerAccount, - type TransactionSigner, - type WritableAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const FINALIZE_DISCRIMINATOR = 5; - -export function getFinalizeDiscriminatorBytes() { - return getU8Encoder().encode(FINALIZE_DISCRIMINATOR); -} - -export type FinalizeInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountAuthority extends string | IAccountMeta = string, - TAccountNextVersion extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableAccount - : TAccountProgram, - TAccountAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountAuthority, - TAccountNextVersion extends string - ? ReadonlyAccount - : TAccountNextVersion, - ...TRemainingAccounts, - ] - >; - -export type FinalizeInstructionData = { discriminator: number }; - -export type FinalizeInstructionDataArgs = {}; - -export function getFinalizeInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: FINALIZE_DISCRIMINATOR }) - ); -} - -export function getFinalizeInstructionDataDecoder(): Decoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); -} - -export function getFinalizeInstructionDataCodec(): Codec< - FinalizeInstructionDataArgs, - FinalizeInstructionData -> { - return combineCodec( - getFinalizeInstructionDataEncoder(), - getFinalizeInstructionDataDecoder() - ); -} - -export type FinalizeInput< - TAccountProgram extends string = string, - TAccountAuthority extends string = string, - TAccountNextVersion extends string = string, -> = { - /** Program account to finalize. */ - program: Address; - /** Program authority. */ - authority: TransactionSigner; - /** The next version of the program (can be itself). */ - nextVersion: Address; -}; - -export function getFinalizeInstruction< - TAccountProgram extends string, - TAccountAuthority extends string, - TAccountNextVersion extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: FinalizeInput, - config?: { programAddress?: TProgramAddress } -): FinalizeInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountNextVersion -> { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - authority: { value: input.authority ?? null, isWritable: false }, - nextVersion: { value: input.nextVersion ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.authority), - getAccountMeta(accounts.nextVersion), - ], - programAddress, - data: getFinalizeInstructionDataEncoder().encode({}), - } as FinalizeInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountNextVersion - >; - - return instruction; -} - -export type ParsedFinalizeInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to finalize. */ - program: TAccountMetas[0]; - /** Program authority. */ - authority: TAccountMetas[1]; - /** The next version of the program (can be itself). */ - nextVersion: TAccountMetas[2]; - }; - data: FinalizeInstructionData; -}; - -export function parseFinalizeInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedFinalizeInstruction { - if (instruction.accounts.length < 3) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - authority: getNextAccount(), - nextVersion: getNextAccount(), - }, - data: getFinalizeInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/instructions/index.ts b/solana-verifier/scripts/loaderV4/instructions/index.ts deleted file mode 100644 index a12eb18..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -export * from './deploy'; -export * from './finalize'; -export * from './retract'; -export * from './transferAuthority'; -export * from './truncate'; -export * from './write'; diff --git a/solana-verifier/scripts/loaderV4/instructions/retract.ts b/solana-verifier/scripts/loaderV4/instructions/retract.ts deleted file mode 100644 index 996f93b..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/retract.ts +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlySignerAccount, - type TransactionSigner, - type WritableAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const RETRACT_DISCRIMINATOR = 3; - -export function getRetractDiscriminatorBytes() { - return getU8Encoder().encode(RETRACT_DISCRIMINATOR); -} - -export type RetractInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountAuthority extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableAccount - : TAccountProgram, - TAccountAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountAuthority, - ...TRemainingAccounts, - ] - >; - -export type RetractInstructionData = { discriminator: number }; - -export type RetractInstructionDataArgs = {}; - -export function getRetractInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: RETRACT_DISCRIMINATOR }) - ); -} - -export function getRetractInstructionDataDecoder(): Decoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); -} - -export function getRetractInstructionDataCodec(): Codec< - RetractInstructionDataArgs, - RetractInstructionData -> { - return combineCodec( - getRetractInstructionDataEncoder(), - getRetractInstructionDataDecoder() - ); -} - -export type RetractInput< - TAccountProgram extends string = string, - TAccountAuthority extends string = string, -> = { - /** Program account to retract. */ - program: Address; - /** Program authority. */ - authority: TransactionSigner; -}; - -export function getRetractInstruction< - TAccountProgram extends string, - TAccountAuthority extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: RetractInput, - config?: { programAddress?: TProgramAddress } -): RetractInstruction { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - authority: { value: input.authority ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.authority), - ], - programAddress, - data: getRetractInstructionDataEncoder().encode({}), - } as RetractInstruction; - - return instruction; -} - -export type ParsedRetractInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to retract. */ - program: TAccountMetas[0]; - /** Program authority. */ - authority: TAccountMetas[1]; - }; - data: RetractInstructionData; -}; - -export function parseRetractInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedRetractInstruction { - if (instruction.accounts.length < 2) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - authority: getNextAccount(), - }, - data: getRetractInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts b/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts deleted file mode 100644 index 64eabd7..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/transferAuthority.ts +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlySignerAccount, - type TransactionSigner, - type WritableAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const TRANSFER_AUTHORITY_DISCRIMINATOR = 4; - -export function getTransferAuthorityDiscriminatorBytes() { - return getU8Encoder().encode(TRANSFER_AUTHORITY_DISCRIMINATOR); -} - -export type TransferAuthorityInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountCurrentAuthority extends string | IAccountMeta = string, - TAccountNewAuthority extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableAccount - : TAccountProgram, - TAccountCurrentAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountCurrentAuthority, - TAccountNewAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountNewAuthority, - ...TRemainingAccounts, - ] - >; - -export type TransferAuthorityInstructionData = { discriminator: number }; - -export type TransferAuthorityInstructionDataArgs = {}; - -export function getTransferAuthorityInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: TRANSFER_AUTHORITY_DISCRIMINATOR }) - ); -} - -export function getTransferAuthorityInstructionDataDecoder(): Decoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); -} - -export function getTransferAuthorityInstructionDataCodec(): Codec< - TransferAuthorityInstructionDataArgs, - TransferAuthorityInstructionData -> { - return combineCodec( - getTransferAuthorityInstructionDataEncoder(), - getTransferAuthorityInstructionDataDecoder() - ); -} - -export type TransferAuthorityInput< - TAccountProgram extends string = string, - TAccountCurrentAuthority extends string = string, - TAccountNewAuthority extends string = string, -> = { - /** Program account to change the authority of. */ - program: Address; - /** Current program authority. */ - currentAuthority: TransactionSigner; - /** New program authority. */ - newAuthority: TransactionSigner; -}; - -export function getTransferAuthorityInstruction< - TAccountProgram extends string, - TAccountCurrentAuthority extends string, - TAccountNewAuthority extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: TransferAuthorityInput< - TAccountProgram, - TAccountCurrentAuthority, - TAccountNewAuthority - >, - config?: { programAddress?: TProgramAddress } -): TransferAuthorityInstruction< - TProgramAddress, - TAccountProgram, - TAccountCurrentAuthority, - TAccountNewAuthority -> { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - currentAuthority: { - value: input.currentAuthority ?? null, - isWritable: false, - }, - newAuthority: { value: input.newAuthority ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.currentAuthority), - getAccountMeta(accounts.newAuthority), - ], - programAddress, - data: getTransferAuthorityInstructionDataEncoder().encode({}), - } as TransferAuthorityInstruction< - TProgramAddress, - TAccountProgram, - TAccountCurrentAuthority, - TAccountNewAuthority - >; - - return instruction; -} - -export type ParsedTransferAuthorityInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to change the authority of. */ - program: TAccountMetas[0]; - /** Current program authority. */ - currentAuthority: TAccountMetas[1]; - /** New program authority. */ - newAuthority: TAccountMetas[2]; - }; - data: TransferAuthorityInstructionData; -}; - -export function parseTransferAuthorityInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedTransferAuthorityInstruction { - if (instruction.accounts.length < 3) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - currentAuthority: getNextAccount(), - newAuthority: getNextAccount(), - }, - data: getTransferAuthorityInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/instructions/truncate.ts b/solana-verifier/scripts/loaderV4/instructions/truncate.ts deleted file mode 100644 index d4f8928..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/truncate.ts +++ /dev/null @@ -1,217 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU32Decoder, - getU32Encoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlySignerAccount, - type TransactionSigner, - type WritableAccount, - type WritableSignerAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const TRUNCATE_DISCRIMINATOR = 1; - -export function getTruncateDiscriminatorBytes() { - return getU8Encoder().encode(TRUNCATE_DISCRIMINATOR); -} - -export type TruncateInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountAuthority extends string | IAccountMeta = string, - TAccountDestination extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableSignerAccount & - IAccountSignerMeta - : TAccountProgram, - TAccountAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountAuthority, - TAccountDestination extends string - ? WritableAccount - : TAccountDestination, - ...TRemainingAccounts, - ] - >; - -export type TruncateInstructionData = { - discriminator: number; - newSize: number; -}; - -export type TruncateInstructionDataArgs = { newSize: number }; - -export function getTruncateInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([ - ['discriminator', getU8Encoder()], - ['newSize', getU32Encoder()], - ]), - (value) => ({ ...value, discriminator: TRUNCATE_DISCRIMINATOR }) - ); -} - -export function getTruncateInstructionDataDecoder(): Decoder { - return getStructDecoder([ - ['discriminator', getU8Decoder()], - ['newSize', getU32Decoder()], - ]); -} - -export function getTruncateInstructionDataCodec(): Codec< - TruncateInstructionDataArgs, - TruncateInstructionData -> { - return combineCodec( - getTruncateInstructionDataEncoder(), - getTruncateInstructionDataDecoder() - ); -} - -export type TruncateInput< - TAccountProgram extends string = string, - TAccountAuthority extends string = string, - TAccountDestination extends string = string, -> = { - /** Program account to change the size of. */ - program: TransactionSigner; - /** Program authority. */ - authority: TransactionSigner; - /** Destination account for reclaimed lamports (optional). */ - destination?: Address; - newSize: TruncateInstructionDataArgs['newSize']; -}; - -export function getTruncateInstruction< - TAccountProgram extends string, - TAccountAuthority extends string, - TAccountDestination extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: TruncateInput, - config?: { programAddress?: TProgramAddress } -): TruncateInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountDestination -> { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - authority: { value: input.authority ?? null, isWritable: false }, - destination: { value: input.destination ?? null, isWritable: true }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - // Original args. - const args = { ...input }; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.authority), - getAccountMeta(accounts.destination), - ], - programAddress, - data: getTruncateInstructionDataEncoder().encode( - args as TruncateInstructionDataArgs - ), - } as TruncateInstruction< - TProgramAddress, - TAccountProgram, - TAccountAuthority, - TAccountDestination - >; - - return instruction; -} - -export type ParsedTruncateInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to change the size of. */ - program: TAccountMetas[0]; - /** Program authority. */ - authority: TAccountMetas[1]; - /** Destination account for reclaimed lamports (optional). */ - destination?: TAccountMetas[2] | undefined; - }; - data: TruncateInstructionData; -}; - -export function parseTruncateInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedTruncateInstruction { - if (instruction.accounts.length < 3) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - authority: getNextAccount(), - destination: getNextOptionalAccount(), - }, - data: getTruncateInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/instructions/write.ts b/solana-verifier/scripts/loaderV4/instructions/write.ts deleted file mode 100644 index 1629a16..0000000 --- a/solana-verifier/scripts/loaderV4/instructions/write.ts +++ /dev/null @@ -1,198 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - addDecoderSizePrefix, - addEncoderSizePrefix, - combineCodec, - getBytesDecoder, - getBytesEncoder, - getStructDecoder, - getStructEncoder, - getU32Decoder, - getU32Encoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type Address, - type Codec, - type Decoder, - type Encoder, - type IAccountMeta, - type IAccountSignerMeta, - type IInstruction, - type IInstructionWithAccounts, - type IInstructionWithData, - type ReadonlySignerAccount, - type ReadonlyUint8Array, - type TransactionSigner, - type WritableAccount, -} from '@solana/web3.js'; -import { SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS } from '../programs'; -import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; - -export const WRITE_DISCRIMINATOR = 0; - -export function getWriteDiscriminatorBytes() { - return getU8Encoder().encode(WRITE_DISCRIMINATOR); -} - -export type WriteInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountProgram extends string | IAccountMeta = string, - TAccountAuthority extends string | IAccountMeta = string, - TRemainingAccounts extends readonly IAccountMeta[] = [], -> = IInstruction & - IInstructionWithData & - IInstructionWithAccounts< - [ - TAccountProgram extends string - ? WritableAccount - : TAccountProgram, - TAccountAuthority extends string - ? ReadonlySignerAccount & - IAccountSignerMeta - : TAccountAuthority, - ...TRemainingAccounts, - ] - >; - -export type WriteInstructionData = { - discriminator: number; - offset: number; - bytes: ReadonlyUint8Array; -}; - -export type WriteInstructionDataArgs = { - offset: number; - bytes: ReadonlyUint8Array; -}; - -export function getWriteInstructionDataEncoder(): Encoder { - return transformEncoder( - getStructEncoder([ - ['discriminator', getU8Encoder()], - ['offset', getU32Encoder()], - ['bytes', addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())], - ]), - (value) => ({ ...value, discriminator: WRITE_DISCRIMINATOR }) - ); -} - -export function getWriteInstructionDataDecoder(): Decoder { - return getStructDecoder([ - ['discriminator', getU8Decoder()], - ['offset', getU32Decoder()], - ['bytes', addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())], - ]); -} - -export function getWriteInstructionDataCodec(): Codec< - WriteInstructionDataArgs, - WriteInstructionData -> { - return combineCodec( - getWriteInstructionDataEncoder(), - getWriteInstructionDataDecoder() - ); -} - -export type WriteInput< - TAccountProgram extends string = string, - TAccountAuthority extends string = string, -> = { - /** Program account to write to. */ - program: Address; - /** Program authority. */ - authority: TransactionSigner; - offset: WriteInstructionDataArgs['offset']; - bytes: WriteInstructionDataArgs['bytes']; -}; - -export function getWriteInstruction< - TAccountProgram extends string, - TAccountAuthority extends string, - TProgramAddress extends - Address = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, ->( - input: WriteInput, - config?: { programAddress?: TProgramAddress } -): WriteInstruction { - // Program address. - const programAddress = - config?.programAddress ?? SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - program: { value: input.program ?? null, isWritable: true }, - authority: { value: input.authority ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - // Original args. - const args = { ...input }; - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - const instruction = { - accounts: [ - getAccountMeta(accounts.program), - getAccountMeta(accounts.authority), - ], - programAddress, - data: getWriteInstructionDataEncoder().encode( - args as WriteInstructionDataArgs - ), - } as WriteInstruction; - - return instruction; -} - -export type ParsedWriteInstruction< - TProgram extends string = typeof SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS, - TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[], -> = { - programAddress: Address; - accounts: { - /** Program account to write to. */ - program: TAccountMetas[0]; - /** Program authority. */ - authority: TAccountMetas[1]; - }; - data: WriteInstructionData; -}; - -export function parseWriteInstruction< - TProgram extends string, - TAccountMetas extends readonly IAccountMeta[], ->( - instruction: IInstruction & - IInstructionWithAccounts & - IInstructionWithData -): ParsedWriteInstruction { - if (instruction.accounts.length < 2) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = instruction.accounts![accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - program: getNextAccount(), - authority: getNextAccount(), - }, - data: getWriteInstructionDataDecoder().decode(instruction.data), - }; -} diff --git a/solana-verifier/scripts/loaderV4/programs/index.ts b/solana-verifier/scripts/loaderV4/programs/index.ts deleted file mode 100644 index 208df6e..0000000 --- a/solana-verifier/scripts/loaderV4/programs/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -export * from './solanaLoaderV4Program'; diff --git a/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts b/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts deleted file mode 100644 index 5f5f09d..0000000 --- a/solana-verifier/scripts/loaderV4/programs/solanaLoaderV4Program.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - containsBytes, - getU8Encoder, - type Address, - type ReadonlyUint8Array, -} from '@solana/web3.js'; -import { - type ParsedDeployInstruction, - type ParsedFinalizeInstruction, - type ParsedRetractInstruction, - type ParsedTransferAuthorityInstruction, - type ParsedTruncateInstruction, - type ParsedWriteInstruction, -} from '../instructions'; - -export const SOLANA_LOADER_V4_PROGRAM_PROGRAM_ADDRESS = - 'CoreBPFLoaderV41111111111111111111111111111' as Address<'CoreBPFLoaderV41111111111111111111111111111'>; - -export enum SolanaLoaderV4ProgramInstruction { - Write, - Truncate, - Deploy, - Retract, - TransferAuthority, - Finalize, -} - -export function identifySolanaLoaderV4ProgramInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array -): SolanaLoaderV4ProgramInstruction { - const data = 'data' in instruction ? instruction.data : instruction; - if (containsBytes(data, getU8Encoder().encode(0), 0)) { - return SolanaLoaderV4ProgramInstruction.Write; - } - if (containsBytes(data, getU8Encoder().encode(1), 0)) { - return SolanaLoaderV4ProgramInstruction.Truncate; - } - if (containsBytes(data, getU8Encoder().encode(2), 0)) { - return SolanaLoaderV4ProgramInstruction.Deploy; - } - if (containsBytes(data, getU8Encoder().encode(3), 0)) { - return SolanaLoaderV4ProgramInstruction.Retract; - } - if (containsBytes(data, getU8Encoder().encode(4), 0)) { - return SolanaLoaderV4ProgramInstruction.TransferAuthority; - } - if (containsBytes(data, getU8Encoder().encode(5), 0)) { - return SolanaLoaderV4ProgramInstruction.Finalize; - } - throw new Error( - 'The provided instruction could not be identified as a solanaLoaderV4Program instruction.' - ); -} - -export type ParsedSolanaLoaderV4ProgramInstruction< - TProgram extends string = 'CoreBPFLoaderV41111111111111111111111111111', -> = - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.Write; - } & ParsedWriteInstruction) - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.Truncate; - } & ParsedTruncateInstruction) - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.Deploy; - } & ParsedDeployInstruction) - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.Retract; - } & ParsedRetractInstruction) - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.TransferAuthority; - } & ParsedTransferAuthorityInstruction) - | ({ - instructionType: SolanaLoaderV4ProgramInstruction.Finalize; - } & ParsedFinalizeInstruction); diff --git a/solana-verifier/scripts/loaderV4/shared/index.ts b/solana-verifier/scripts/loaderV4/shared/index.ts deleted file mode 100644 index 01a7d93..0000000 --- a/solana-verifier/scripts/loaderV4/shared/index.ts +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This code was AUTOGENERATED using the codama library. - * Please DO NOT EDIT THIS FILE, instead use visitors - * to add features, then rerun codama to update it. - * - * @see https://github.com/codama-idl/codama - */ - -import { - AccountRole, - isProgramDerivedAddress, - isTransactionSigner as web3JsIsTransactionSigner, - type Address, - type IAccountMeta, - type IAccountSignerMeta, - type ProgramDerivedAddress, - type TransactionSigner, - upgradeRoleToSigner, -} from '@solana/web3.js'; - -/** - * Asserts that the given value is not null or undefined. - * @internal - */ -export function expectSome(value: T | null | undefined): T { - if (value == null) { - throw new Error('Expected a value but received null or undefined.'); - } - return value; -} - -/** - * Asserts that the given value is a PublicKey. - * @internal - */ -export function expectAddress( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined -): Address { - if (!value) { - throw new Error('Expected a Address.'); - } - if (typeof value === 'object' && 'address' in value) { - return value.address; - } - if (Array.isArray(value)) { - return value[0]; - } - return value as Address; -} - -/** - * Asserts that the given value is a PDA. - * @internal - */ -export function expectProgramDerivedAddress( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined -): ProgramDerivedAddress { - if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { - throw new Error('Expected a ProgramDerivedAddress.'); - } - return value; -} - -/** - * Asserts that the given value is a TransactionSigner. - * @internal - */ -export function expectTransactionSigner( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined -): TransactionSigner { - if (!value || !isTransactionSigner(value)) { - throw new Error('Expected a TransactionSigner.'); - } - return value; -} - -/** - * Defines an instruction account to resolve. - * @internal - */ -export type ResolvedAccount< - T extends string = string, - U extends - | Address - | ProgramDerivedAddress - | TransactionSigner - | null = - | Address - | ProgramDerivedAddress - | TransactionSigner - | null, -> = { - isWritable: boolean; - value: U; -}; - -/** - * Defines an instruction that stores additional bytes on-chain. - * @internal - */ -export type IInstructionWithByteDelta = { - byteDelta: number; -}; - -/** - * Get account metas and signers from resolved accounts. - * @internal - */ -export function getAccountMetaFactory( - programAddress: Address, - optionalAccountStrategy: 'omitted' | 'programId' -) { - return ( - account: ResolvedAccount - ): IAccountMeta | IAccountSignerMeta | undefined => { - if (!account.value) { - if (optionalAccountStrategy === 'omitted') return; - return Object.freeze({ - address: programAddress, - role: AccountRole.READONLY, - }); - } - - const writableRole = account.isWritable - ? AccountRole.WRITABLE - : AccountRole.READONLY; - return Object.freeze({ - address: expectAddress(account.value), - role: isTransactionSigner(account.value) - ? upgradeRoleToSigner(writableRole) - : writableRole, - ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), - }); - }; -} - -export function isTransactionSigner( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner -): value is TransactionSigner { - return ( - !!value && - typeof value === 'object' && - 'address' in value && - web3JsIsTransactionSigner(value) - ); -} diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index 2cbd3ca..b7f7e41 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -53,9 +53,7 @@ import { use as chaiUse, expect } from "chai"; import deepEqualInAnyOrder from "deep-equal-in-any-order"; import { GROTH16_VERIFIER_PROGRAM_ADDRESS } from "../scripts/groth16"; import { TEST_BAD_VERIFIER_PROGRAM_ADDRESS } from "../scripts/bad-verifier"; -import { - SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, -} from "../scripts/loaderV3"; +import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from "../scripts/loaderV3"; import chaiAsPromised from "chai-as-promised"; @@ -66,7 +64,7 @@ async function expectError( promise: Promise, errorType: string, errorMessage?: string, - log: boolean = false, + log: boolean = false ): Promise { try { await promise; @@ -96,7 +94,7 @@ describe("verifier-router", () => { let notOwner: TransactionPartialSigner; let sendTx: ( instruction: TTransaction["instructions"][number], - authority?: TransactionPartialSigner, + authority?: TransactionPartialSigner ) => Promise; // Test Proof for the Test Bad Verifier @@ -131,21 +129,21 @@ describe("verifier-router", () => { // Calculate the PDA for the Router Program const routerAddressPDA = await getRouterPda( - VERIFIER_ROUTER_PROGRAM_ADDRESS, + VERIFIER_ROUTER_PROGRAM_ADDRESS ); routerAddress = routerAddressPDA.address; // Calculate the PDA for the Groth16 Verifier Program grothPda = await getVerifierEntryPda( VERIFIER_ROUTER_PROGRAM_ADDRESS, - GROTH16_SELECTOR, + GROTH16_SELECTOR ); grothPDAAddress = grothPda.address; console.log(`Groth Verifier (Verifier Entry) Address: ${grothPDAAddress}`); const grothProgramData = await getProgramDataAddress( - GROTH16_VERIFIER_PROGRAM_ADDRESS, + GROTH16_VERIFIER_PROGRAM_ADDRESS ); grothProgramDataAddress = grothProgramData.address; @@ -154,22 +152,22 @@ describe("verifier-router", () => { // Calculate the PDA for the TestBadVerifier Program badVerifierPda = await getVerifierEntryPda( VERIFIER_ROUTER_PROGRAM_ADDRESS, - TEST_BAD_SELECTOR, + TEST_BAD_SELECTOR ); badVerifierPDAAddress = badVerifierPda.address; console.log( - `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}`, + `Bad Verifier (Verifier Entry) Address: ${badVerifierPDAAddress}` ); const badVerifierProgramData = await getProgramDataAddress( - TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + TEST_BAD_VERIFIER_PROGRAM_ADDRESS ); badVerifierProgramDataAddress = badVerifierProgramData.address; console.log( - `Bad Verifier Program Data Address: ${badVerifierProgramDataAddress}`, + `Bad Verifier Program Data Address: ${badVerifierProgramDataAddress}` ); }); @@ -226,7 +224,7 @@ describe("verifier-router", () => { await expectError( sendTx(transactionInstruction), - "VerifierInvalidAuthority", + "VerifierInvalidAuthority" ); }); @@ -236,11 +234,11 @@ describe("verifier-router", () => { rpcSubscriptions, TEST_BAD_VERIFIER_PROGRAM_ADDRESS, deployerKeyPair, - routerAddress, + routerAddress ); }); - it("Sholud not allow a user to pass in a different ProgramData account then the one for the verifier being added", async () => { + it("Should not allow a user to pass in a different ProgramData account then the one for the verifier being added", async () => { const addBadVerifierInstruction = getAddVerifierInstruction({ authority: owner, router: routerAddress, @@ -253,7 +251,7 @@ describe("verifier-router", () => { await expectError( sendTx(addBadVerifierInstruction), "ConstraintSeeds", - "Expected to get a Constraint Seeds error, but did not", + "Expected to get a Constraint Seeds error, but did not" ); }); @@ -263,7 +261,7 @@ describe("verifier-router", () => { rpcSubscriptions, GROTH16_VERIFIER_PROGRAM_ADDRESS, deployerKeyPair, - routerAddress, + routerAddress ); }); @@ -280,7 +278,7 @@ describe("verifier-router", () => { await expectError( sendTx(addGrothInstruction), "NotOwner", - "A non-owner was able to add a verifier to the router", + "A non-owner was able to add a verifier to the router" ); }); @@ -297,7 +295,7 @@ describe("verifier-router", () => { await expectError( sendTx(addBadVerifierInstruction), "SelectorInvalid", - "Was expecting an Invalid Selector Error", + "Was expecting an Invalid Selector Error" ); }); @@ -332,7 +330,7 @@ describe("verifier-router", () => { const grothAccount = await fetchVerifierEntry(rpc, grothPDAAddress); expect(grothAccount.data.selector).to.equal(GROTH16_SELECTOR); expect(grothAccount.data.verifier).to.equal( - GROTH16_VERIFIER_PROGRAM_ADDRESS, + GROTH16_VERIFIER_PROGRAM_ADDRESS ); await sendTx(addBadVerifierInstruction); @@ -340,7 +338,7 @@ describe("verifier-router", () => { const badAccount = await fetchVerifierEntry(rpc, badVerifierPDAAddress); expect(badAccount.data.selector).to.equal(TEST_BAD_SELECTOR); expect(badAccount.data.verifier).to.equal( - TEST_BAD_VERIFIER_PROGRAM_ADDRESS, + TEST_BAD_VERIFIER_PROGRAM_ADDRESS ); routerAccount = await fetchVerifierRouter(rpc, routerAddress); @@ -379,7 +377,7 @@ describe("verifier-router", () => { await expectError( sendTx(verifyInstruction), "VerificationError", - "Expected to hit a Verification Error but the transaction did not error out.", + "Expected to hit a Verification Error but the transaction did not error out." ); }); @@ -400,7 +398,7 @@ describe("verifier-router", () => { await expectError( sendTx(estopProofInstruction), "VerificationError", - "Was expecting the estop call to fail but it did not", + "Was expecting the estop call to fail but it did not" ); }); @@ -436,7 +434,7 @@ describe("verifier-router", () => { const verifierEntry = await fetchMaybeVerifierEntry( rpc, - badVerifierPDAAddress, + badVerifierPDAAddress ); expect(verifierEntry.exists).to.equal(false); From d2761403ac75b0f527f8fac57a3a13257d0c4d76 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Fri, 27 Dec 2024 05:12:28 -0700 Subject: [PATCH 12/21] Added additional comments and documentation to the project. Added an example environment file. Modified the E-stop with proof to not require an imageId or Journal digest --- README.md | 73 ------ solana-utils/Cargo.lock | 7 - solana-utils/Cargo.toml | 6 - solana-utils/src/lib.rs | 37 --- solana-verifier/Cargo.toml | 2 +- solana-verifier/README.md | 212 +++++++++++++++++ solana-verifier/example.env | 71 ++++++ .../verifier_router/src/estop/errors.rs | 11 - .../programs/verifier_router/src/estop/mod.rs | 112 ++++++--- .../programs/verifier_router/src/lib.rs | 17 +- .../verifier_router/src/router/mod.rs | 80 +++++-- .../programs/verifier_router/src/state/mod.rs | 11 +- solana-verifier/scripts/acceptOwnership.ts | 40 ++++ solana-verifier/scripts/addVerifier.ts | 46 +++- solana-verifier/scripts/codma.ts | 41 ++++ solana-verifier/scripts/deploy.ts | 50 +++- solana-verifier/scripts/estop.ts | 45 ++++ solana-verifier/scripts/renounceOwnership.ts | 55 ++++- solana-verifier/scripts/transferOwnership.ts | 44 +++- solana-verifier/scripts/utils/addVerifier.ts | 38 ++- solana-verifier/scripts/utils/deploy.ts | 48 +++- solana-verifier/scripts/utils/estop.ts | 34 ++- .../scripts/utils/fireblocksSigner.ts | 81 ++++++- solana-verifier/scripts/utils/init.ts | 24 ++ solana-verifier/scripts/utils/ownership.ts | 81 +++++++ solana-verifier/scripts/utils/utils.ts | 221 +++++++++++++++++- .../verify-router/instructions/addVerifier.ts | 28 +++ .../instructions/emergencyStop.ts | 69 ++++-- .../instructions/emergencyStopWithProof.ts | 81 ++++--- .../verify-router/instructions/initialize.ts | 12 +- .../verify-router/instructions/verify.ts | 33 +-- solana-verifier/tests/router-verifier.ts | 16 +- 32 files changed, 1425 insertions(+), 301 deletions(-) delete mode 100644 README.md delete mode 100644 solana-utils/Cargo.lock delete mode 100644 solana-utils/Cargo.toml delete mode 100644 solana-utils/src/lib.rs create mode 100644 solana-verifier/README.md create mode 100644 solana-verifier/example.env delete mode 100644 solana-verifier/programs/verifier_router/src/estop/errors.rs diff --git a/README.md b/README.md deleted file mode 100644 index ddc3b1f..0000000 --- a/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# RISC Zero Solana Groth16 Verifier - -> **This is unaudited and not for production use.** - -A RISC Zero Groth16 SNARK verifier compatible with Solana. This library provides functionality for verifying RISC Zero proofs on the Solana blockchain. - -## Usage - -### Verifying a Proof - -```rust -use risc0_groth16_verifier::{verify_proof, Proof, PublicInputs, VerificationKey}; - -let proof: Proof = // ... load or deserialize proof -let public_inputs: PublicInputs<5> = // ... load or deserialize public inputs -let vk: VerificationKey = // ... load or deserialize verification key - -let result = verify_proof(&proof, &public_inputs, &vk); -assert!(result.is_ok(), "Proof verification failed"); -``` - -### Generating Public Inputs - -```rust -use risc0_groth16_verifier::public_inputs; - -let claim_digest: [u8; 32] = // ... obtain claim digest -let allowed_control_root: &str = // ... specify allowed control root -let bn254_identity_control_id: &str = // ... specify BN254 identity control ID - -let public_inputs = public_inputs(claim_digest, allowed_control_root, bn254_identity_control_id)?; -``` - -### Working with Proofs and Verification Keys - -The library provides utilities for serializing and deserializing proofs and verification keys: - -```rust -use risc0_groth16_verifier::client::{Proof, VerificationKey}; - -// Serialize to JSON -let proof_json = serde_json::to_string(&proof)?; -let vk_json = serde_json::to_string(&vk)?; - -// Deserialize from JSON -let proof: Proof = serde_json::from_str(&proof_json)?; -let vk: VerificationKey = serde_json::from_str(&vk_json)?; -``` - -## Client-side Utilities - -The library includes client-side utilities for working with proofs and verification keys: - -- Compression of G1 and G2 points -- Conversion between JSON and binary formats -- Writing proofs and verification keys to files - -## Testing - -The library includes a non-exhuastive test suite. Run the tests using: - -``` -cargo test -``` - -## Acknowledgments - -- Light Protocol [groth16-solana](https://github.com/Lightprotocol/groth16-solana/tree/master) -- [Solana Foundation](https://solana.org/grants-funding) - -## License - -This project is licensed under the Apache2 license. See [LICENSE](./LICENSE). diff --git a/solana-utils/Cargo.lock b/solana-utils/Cargo.lock deleted file mode 100644 index d0f83b8..0000000 --- a/solana-utils/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "solana-utils" -version = "0.1.0" diff --git a/solana-utils/Cargo.toml b/solana-utils/Cargo.toml deleted file mode 100644 index d620e46..0000000 --- a/solana-utils/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "solana-utils" -version = "0.1.0" -edition = "2021" - -[dependencies] diff --git a/solana-utils/src/lib.rs b/solana-utils/src/lib.rs deleted file mode 100644 index fe6d218..0000000 --- a/solana-utils/src/lib.rs +++ /dev/null @@ -1,37 +0,0 @@ -use num_bigint::BigUint; -use risc0_zkvm::{Groth16Receipt, Groth16Seal, ReceiptClaim}; - -pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], ()> { - let x = &point[..32]; - let y = &point[32..]; - - let mut y_big = BigUint::from_bytes_be(y); - let field_modulus = BigUint::from_bytes_be(&BASE_FIELD_MODULUS_Q); - - // Negate the y-coordinate to get -g1. - y_big = field_modulus - y_big; - - // Reconstruct the point with the negated y-coordinate - let mut result = [0u8; 64]; - result[..32].copy_from_slice(x); - let y_bytes = y_big.to_bytes_be(); - result[64 - y_bytes.len()..].copy_from_slice(&y_bytes); - - Ok(result) -} - -pub fn receipt_to_proof(receipt: &Groth16Receipt) -> Result { - let seal = &receipt.seal; - if seal.len() < 256 { - return Err(()); - } - - let mut proof = Proof { - pi_a: seal[0..64].try_into().map_err(|_| ())?, - pi_b: seal[64..192].try_into().map_err(|_| ())?, - pi_c: seal[192..256].try_into().map_err(|_| ())?, - }; - - proof.pi_a = negate_g1(&proof.pi_a)?; - Ok(proof) -} diff --git a/solana-verifier/Cargo.toml b/solana-verifier/Cargo.toml index 29c7a9a..c2ca2b5 100644 --- a/solana-verifier/Cargo.toml +++ b/solana-verifier/Cargo.toml @@ -1,6 +1,6 @@ [workspace] members = [ - "programs/*" + "programs/*", ] resolver = "2" diff --git a/solana-verifier/README.md b/solana-verifier/README.md new file mode 100644 index 0000000..0f2e884 --- /dev/null +++ b/solana-verifier/README.md @@ -0,0 +1,212 @@ +# Solana Zero-Knowledge Proof Verifier Router + +A flexible and secure system for managing zero-knowledge proof verifications on Solana. This project provides a router-based verification system with non-upgradeable verifiers that have emergency controls, and comprehensive administration tools. + +## Overview + +The Verifier Router system enables: +- Dynamic registration and routing of ZK proof verifiers +- Emergency stop mechanisms with both centralized and decentralized triggers +- Flexible ownership controls with two-step transfers + +Comprehensive script support for program management: +- Supports both local key signers and Fireblocks HSM +- Supports adding additional verifiers beyond the currently supported Groth_16 program +- Ownership management and transfer +- Emergency Stop by owner + +## Getting Started + +### Prerequisites +- Rust and Cargo +- Solana Tool Suite +- Node.js and Yarn +- Anchor Framework + +### Installation + +1. Clone the repository: +```bash +git clone +cd verifier-router +``` + +2. Install dependencies: +```bash +yarn install +``` + +3. Configure environment: +```bash +cp example.env .env +# Edit .env with your configuration +``` + +### Deployment +Note: Deployment accounts need at minimum a 6 SOL balance by default and +any non-deployment actions require an account with a 1 SOL minimum balance. + + +1. Deploy the router and initial verifier: +```bash +anchor keys sync +yarn run client +yarn run deploy +``` + +2. (Optional) Add additional verifiers programs: +```bash +yarn run add +``` + +## System Architecture + +### Components + +1. **Router Program**: Central registry and routing system +2. **Verifier Programs**: Individual verifier implementations (e.g., Groth16) +3. **Client Programs**: Programs that use the router for proof verification + +## Implementation Example + +```rust +#[derive(Accounts)] +pub struct IncrementNonce<'info> { + #[account(mut)] + pub program_data: Account<'info, ProgramData>, + pub router: Program<'info, VerifierRouterProgram>, + pub router_account: Account<'info, VerifierRouter>, + #[account( + seeds = [ + b"verifier", + &program_data.selector.to_le_bytes() + ], + bump, + seeds::program = verifier_router::ID, + )] + pub verifier_entry: Account<'info, VerifierEntry>, + pub verifier_program: UncheckedAccount<'info>, + pub system_program: Program<'info, System>, +} + + pub fn increment_nonce( + ctx: Context, + proof: Proof, + journal_nonce: u32, + ) -> Result<()> { + // Your programs initial code... + + // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program + let cpi_accounts = Verify { + router: ctx.accounts.router_account.to_account_info(), + verifier_entry: ctx.accounts.verifier_entry.to_account_info(), + verifier_program: ctx.accounts.verifier_program.to_account_info(), + system_program: ctx.accounts.system_program.to_account_info(), + }; + + // We hash our journal outputs that we used for our earlier requirements to get a journal digest + let journal_digest = hashv(&[&journal_nonce.to_le_bytes()]).to_bytes(); + + // We collect the image ID that our program is expecting our proof to match so that an attacker cannot use + // a proof generated from a modified program + let image_id = ctx.accounts.program_data.image_id; + + // We pass the selector for the proof verifier that we are currently using + let selector = ctx.accounts.program_data.selector; + + // We setup our CPI context for the router + let cpi_ctx = CpiContext::new(ctx.accounts.router.to_account_info(), cpi_accounts); + + // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid + // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although + // behavior would be the same if I ignored the result. + verifier_router::cpi::verify(cpi_ctx, selector, proof, image_id, journal_digest).unwrap(); + + // Your programs code after a successful verification... + } +``` + +## Administrative Functions + +### Router Management + +1. Transfer Ownership: +```bash +NEW_OWNER= yarn run transfer +yarn run accept # Run on new owner's machine +``` + +2. Add Verifier: +```bash +VERIFIER_ADDRESS=
yarn run add +``` + +3. Emergency Stop: +```bash +yarn run estop # Follow prompts +``` + +### Emergency Stop Mechanisms + +#### Owner-Triggered Stop +```bash +yarn run estop +# Enter selector when prompted +# Confirm with "YES CALL EMERGENCY STOP" +``` + +#### Proof-Based Stop +Submit a proof demonstrating exploitation to trigger automatic shutdown: +```rust +verifier_router::cpi::emergency_stop_with_proof( + context, + selector, + exploitation_proof +) +``` + +## Security Considerations + +1. **Proof Verification**: + - Always validate journal digests + - Check image IDs match expected values + - Verify that journal outputs are valid for your use case + +2. **Account Validation**: + - Verify PDA derivations + - Check verifier program addresses + - Validate selectors and authorities + +## Development Tools + +### Scripts +All scripts have values set in the environment, see `example.env` for a full +list of options. + +- `yarn run deploy`: Deploy programs +- `yarn run add`: Add new verifier +- `yarn run estop`: Emergency stop by owner +- `yarn run transfer`: Transfer ownership +- `yarn run accept`: Accept ownership +- `yarn run renounce`: Renounce ownership +- `yarn run client`: Generate TypeScript clients + +### Environment Variables + +See `example.env` for full configuration options including: +- Network endpoints +- Account addresses +- Deployment settings +- Fireblocks integration (optional) + +## Testing + +Open a terminal and run a local validator: +```bash +solana-test-validator -r +``` + +Then in another terminal run: +```bash +anchor test --skip-local-validator +``` \ No newline at end of file diff --git a/solana-verifier/example.env b/solana-verifier/example.env new file mode 100644 index 0000000..3e61195 --- /dev/null +++ b/solana-verifier/example.env @@ -0,0 +1,71 @@ +# Solana Network Configuration +# Optional: RPC endpoint for Solana +# Default: "http://localhost:8899" +RPC="http://localhost:8899" + +# Optional: WebSocket endpoint for Solana subscriptions +# Default: "ws://localhost:8900" +RPC_SUBSCRIPTION="ws://localhost:8900" + +# Account and Program Configuration +# Optional: Path to keypair file +# Default: "~/.config/solana/id.json" +KEY_PAIR_FILE="~/.config/solana/id.json" + +# Optional: Address of the router program +# Default: Uses the address from the latest build +ROUTER_ADDRESS="DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa" + +# Optional: Address of the verifier program to add +# Default: Uses the Groth16 verifier address from the latest build +VERIFIER_ADDRESS="Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa" + +# Required: Only when running transferOwnership.ts +# The public key of the new owner for ownership transfer +NEW_OWNER="AnchoURaVvRYGHqrwEGqr83PUZjZYJu3VCqykkQxRPTo" + +# Optional: Owner of the router (used in some scripts for checks) +# Default: Uses the local keypair's public key +ROUTER_OWNER="DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa" + +# Deployment Configuration +# Optional: Build programs with verification enabled +# Default: false +# Values: "true" or "false" +VERIFIABLE="false" + +# Optional: Minimum SOL balance required in deployer account +# Default: 6 SOL +MINIMUM_DEPLOY_BALANCE="6" + +# Optional: Minimum SOL balance required in owner account +# Default: 1 SOL +MINIMUM_BALANCE="1" + +# Logging Configuration +# Optional: Sets the log level for output +# Default: "info" +# Values: "silly", "trace", "debug", "info", "warn", "error", "fatal" +LOG_LEVEL="info" + +# Fireblocks Integration Configuration +# All Fireblocks variables are optional as a group, but if using Fireblocks, +# FIREBLOCKS_PRIVATE_KEY_PATH, FIREBLOCKS_API_KEY, and FIREBLOCKS_VAULT are required + +# Required if using Fireblocks: Path to Fireblocks API private key file +FIREBLOCKS_PRIVATE_KEY_PATH="~/fireblocks_secret.key" + +# Required if using Fireblocks: Fireblocks API key +FIREBLOCKS_API_KEY="your-api-key-here" + +# Optional if using Fireblocks: Fireblocks API base path +# Default: "sandbox" +# Values: "sandbox", "us", "eu", "eu2" +FIREBLOCKS_BASE_PATH="sandbox" + +# Optional if using Fireblocks: Asset ID in Fireblocks +# Default: "SOL_TEST" +FIREBLOCKS_ASSET_ID="SOL_TEST" + +# Required if using Fireblocks: Vault account ID in Fireblocks +FIREBLOCKS_VAULT="0" \ No newline at end of file diff --git a/solana-verifier/programs/verifier_router/src/estop/errors.rs b/solana-verifier/programs/verifier_router/src/estop/errors.rs deleted file mode 100644 index bbe47a1..0000000 --- a/solana-verifier/programs/verifier_router/src/estop/errors.rs +++ /dev/null @@ -1,11 +0,0 @@ -use anchor_lang::prelude::*; - -/// Error codes specific to emergency stop operations -/// -/// # Variants -/// * `InvalidProofOfExploit` - Returned when a provided proof of invalid behavior fails verification -#[error_code] -pub enum EstopError { - #[msg("Invalid proof of exploit")] - InvalidProofOfExploit, -} diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs index 78b205d..445ccff 100644 --- a/solana-verifier/programs/verifier_router/src/estop/mod.rs +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -2,19 +2,24 @@ use anchor_lang::prelude::*; use anchor_lang::solana_program::program::invoke_signed; use groth_16_verifier::cpi::accounts::VerifyProof; use groth_16_verifier::Proof; -pub mod errors; pub mod events; use crate::state::{VerifierEntry, VerifierRouter}; use crate::RouterError; -use errors::EstopError; use events::EmergencyStopEvent; use anchor_lang::solana_program::bpf_loader_upgradeable; +/// Account validation for emergency stop operations +/// +/// Validates accounts needed for stopping a verifier and closing its accounts. +/// Can be triggered by owner or with a valid proof of exploit. +/// +/// # Arguments +/// * `selector` - A u32 that uniquely identifies the verifier to stop #[derive(Accounts)] #[instruction(selector: u32)] pub struct EmergencyStop<'info> { - /// The router account containing ownership and verifier registry + /// The router account PDA managing verifiers and required Upgrade Authority address of verifier #[account( mut, seeds = [b"router"], @@ -22,7 +27,8 @@ pub struct EmergencyStop<'info> { )] pub router: Account<'info, VerifierRouter>, - /// The verifier entry to be closed + /// The verifier entry of the program to be stopped. + /// This entry will be closed and refunded to the caller on successful stop #[account( mut, seeds = [ @@ -36,12 +42,14 @@ pub struct EmergencyStop<'info> { )] pub verifier_entry: Account<'info, VerifierEntry>, - /// The authority attempting the emergency stop + /// The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + /// The authority will get the rent refund of both the program account of the verifier and the verifierEntry account #[account(mut)] pub authority: Signer<'info>, - /// The program account of the verifier to be used - /// Address is verified against VerifierEntry + /// The program account of the verifier to be used Address is verified against VerifierEntry + /// Must be Unchecked as there could be any program ID here. + /// This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority /// CHECK: This program is deployed and checked against our PDA entries #[account( mut, @@ -61,13 +69,35 @@ pub struct EmergencyStop<'info> { )] pub verifier_program_data: Account<'info, ProgramData>, - /// CHECK: This is the BPF Loader for calling close + /// This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + /// CPI extensions to automatically generate a secure CPI call and must do so manually + /// CHECK: Verify the program address matches the known Loader V3 Program Address #[account(constraint = bpf_loader_upgradable_program.key() == bpf_loader_upgradeable::ID)] pub bpf_loader_upgradable_program: UncheckedAccount<'info>, + /// Required because we are closing accounts pub system_program: Program<'info, System>, } +/// # WARNING: IRREVERSIBLE ACTION +/// Calling E-Stop on a Verifier will close the program account, +/// close the VerifierEntry Account and permanently disable the +/// verifier selector associated with the E-Stop'd Program. If successfully +/// called there is no way to re-enable a stopped selector, make sure you really +/// want to do this. +/// +/// Executes an emergency stop of a verifier by the owner +/// +/// Closes the verifier entry and program accounts, preventing further use. +/// Can only be called by the router's owner. The caller of this function gets +/// the rent refund. +/// +/// # Arguments +/// * `ctx` - The EmergencyStop context containing validated accounts +/// * `selector` - The selector of the verifier to stop +/// +/// # Returns +/// * `Ok(())` if the emergency stop is successful pub fn emergency_stop_by_owner(ctx: Context, selector: u32) -> Result<()> { // Verify the caller is Contract Owner ctx.accounts @@ -95,6 +125,27 @@ pub fn emergency_stop_by_owner(ctx: Context, selector: u32) -> Re Ok(()) } +/// Closes a verifier program by closing its program data account +/// +/// Internal function used by emergency stop operations to close a verifier's +/// program data account and transfer the rent to a recipient. +/// +/// # Arguments +/// * `router` - The router account managing the verifiers and the upgrade authority of the verifier +/// * `router_bumps` - Bump seed for the router's PDA +/// * `recipient` - Account that will receive the returned rent +/// * `verifier_program` - The program account of the verifier being closed +/// * `verifier_program_data` - The program data account of the verifier being closed +/// * `loader_v3` - The BPF loader program account +/// +/// # Returns +/// * `Ok(())` if the verifier is successfully closed +/// * `Err` if the CPI to close the program fails +/// +/// # Security Considerations +/// * Only callable by emergency stop functions +/// * Requires router signer seeds for CPI authorization +/// * Transfers rent to the specified recipient fn close_verifier<'info>( router: &Account<'info, VerifierRouter>, router_bumps: u8, @@ -127,39 +178,46 @@ fn close_verifier<'info>( Ok(()) } +/// Executes an emergency stop of a verifier using a proof of exploit +/// +/// Allows anyone to stop a verifier by providing a valid proof of exploitation. +/// The caller of this function gets the rent refund. +/// +/// # Notice: +/// +/// If you have identified a vulnerability in any of our verifiers and are able to +/// craft a malicious proof *please* construct a proof that verifies with a null +/// image id and has a null journal digest and submit it to this function which will +/// immediately disable the verifier from future use. +/// +/// If you believe you have identified a vulnerability and are unable to submit an +/// invalid proof please contact the Risc0 team immediately if possible. +/// +/// # Arguments +/// * `ctx` - The EmergencyStop context containing validated accounts +/// * `selector` - The selector of the verifier to stop +/// * `proof` - The proof demonstrating the exploit +/// * `image_id` - The image ID associated with the proof +/// * `journal_digest` - The journal digest for verification +/// +/// # Returns +/// * `Ok(())` if the emergency stop is successful +/// * `Err(EstopError::InvalidProofOfExploit)` if the proof is invalid pub fn emergency_stop_with_proof( ctx: Context, selector: u32, proof: Proof, - image_id: [u8; 32], - journal_digest: [u8; 32], ) -> Result<()> { let zero_array = [0u8; 32]; - msg!("Emergency Stop With Proof Reached!"); - require!( - image_id == zero_array && journal_digest == zero_array, - EstopError::InvalidProofOfExploit - ); - msg!("Proof requirements Passed!"); - // Attempt to verify the proof let verifier_program = ctx.accounts.verifier_program.to_account_info(); let verifier_accounts = VerifyProof { system_program: ctx.accounts.system_program.to_account_info(), }; - msg!("Making CPI call to verifier"); let verify_ctx = CpiContext::new(verifier_program, verifier_accounts); - let _ = groth_16_verifier::cpi::verify(verify_ctx, proof, image_id, journal_digest); - - msg!("Call did pass"); - let router_seed = &[b"router".as_ref(), &[ctx.bumps.router]]; - msg!( - "Router Seed: {:?} & Bumps: {} ", - router_seed, - ctx.bumps.router - ); + let _ = groth_16_verifier::cpi::verify(verify_ctx, proof, zero_array, zero_array); close_verifier( &ctx.accounts.router, diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index da10a44..4ab960a 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -11,6 +11,18 @@ use router::*; use state::*; declare_id!("DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa"); + +/// Verifier Router Program for Anchor +/// +/// This program provides a routing and management system for zero-knowledge proof verifiers +/// on Solana. It implements a registry of verifier programs that can be dynamically added +/// and managed, with built-in emergency stop capabilities for security. +/// +/// # Features +/// * Registry of verifier programs with unique selectors +/// * Two-step ownership transfers via the Ownable trait +/// * Verifier upgrade authority checks on addition to registry +/// * Emergency stop functionality with proof-based or owner-based calls #[program] pub mod verifier_router { use state::VerifierRouter; @@ -26,6 +38,7 @@ pub mod verifier_router { router::add_verifier(ctx, selector) } + /// This is a test to explore what happens with the text here pub fn verify( ctx: Context, selector: u32, @@ -45,10 +58,8 @@ pub mod verifier_router { ctx: Context, selector: u32, proof: Proof, - image_id: [u8; 32], - journal_digest: [u8; 32], ) -> Result<()> { - estop::emergency_stop_with_proof(ctx, selector, proof, image_id, journal_digest) + estop::emergency_stop_with_proof(ctx, selector, proof) } pub fn transfer_ownership( diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs index 5567591..0afbbdf 100644 --- a/solana-verifier/programs/verifier_router/src/router/mod.rs +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -10,10 +10,15 @@ pub use groth_16_verifier::program::Groth16Verifier; use groth_16_verifier::cpi::accounts::VerifyProof; /// Account validation struct for router initialization +/// +/// # Security Considerations +/// * Initializes a new PDA with seeds = [b"router"] +/// * Requires a signing authority that will become the initial owner +/// * Allocates space for ownership data and verifier count #[derive(Accounts)] pub struct Initialize<'info> { - /// The router account to be initialized - /// Space allocated for discriminator + owner + option + count + /// The router account PDA to be initialized + /// Space allocated for discriminator + owner (Pubkey) + pending_owner: (Option) + count (u32) #[account( init, seeds = [b"router"], @@ -31,9 +36,16 @@ pub struct Initialize<'info> { pub system_program: Program<'info, System>, } +/// Account validation for adding a new verifier program +/// +/// # Security Considerations +/// * Validates the verifier program's upgrade authority is the router +/// * Ensures sequential selector assignment +/// * Creates a PDA for the verifier entry with seeds = [b"verifier", selector_bytes] #[derive(Accounts)] #[instruction(selector: u32)] pub struct AddVerifier<'info> { + /// The router account PDA managing verifiers and required Upgrade Authority address of verifier #[account( mut, seeds = [b"router"], @@ -41,6 +53,7 @@ pub struct AddVerifier<'info> { )] pub router: Account<'info, VerifierRouter>, + /// The new verifier entry to be created which must have a selector in sequential order #[account( init, payer = authority, @@ -54,6 +67,7 @@ pub struct AddVerifier<'info> { )] pub verifier_entry: Account<'info, VerifierEntry>, + /// Program data account (Data of account authority from LoaderV3) of the verifier being added #[account( seeds = [ verifier_program.key().as_ref() @@ -64,34 +78,42 @@ pub struct AddVerifier<'info> { )] pub verifier_program_data: Account<'info, ProgramData>, + /// The program executable code account of the verifier program to be added + /// Must be an unchecked account because any program ID can be here + /// CHECK: checks are done by constraint in program data account #[account( executable )] - /// CHECK: checks are done by constraint in program data account pub verifier_program: UncheckedAccount<'info>, + /// The owner of the router which must sign this transaction #[account(mut)] pub authority: Signer<'info>, + /// Required for account initialization pub system_program: Program<'info, System>, } -/// Account validation struct for verifier operations +/// Account validation for verifier calls +/// +/// Validates accounts needed for proof verification and ensures the +/// verifier program matches the registered entry of the requested selector. +/// +/// Ensures a program is not attempting to use a selector which had been E-Stopped. /// /// # Arguments /// * `selector` - A u32 that uniquely identifies the verifier entry #[derive(Accounts)] #[instruction(selector: u32)] pub struct Verify<'info> { - /// The router account containing the verifier registry + /// The router account PDA managing verifiers #[account( seeds = [b"router"], bump )] pub router: Account<'info, VerifierRouter>, - /// The verifier entry to use, validated using PDA derivation - /// Seeds are ["verifier", selector_bytes] + /// The verifier entry to use, validated using PDA derivation #[account( seeds = [ b"verifier", @@ -102,7 +124,9 @@ pub struct Verify<'info> { )] pub verifier_entry: Account<'info, VerifierEntry>, - /// The verifier Program account that is matched to the verifier entry + /// The verifier program to be invoked + /// Must match the address of the program listed in the verifier entry of the specific selector + /// Must be an unchecked account because any program ID can be here /// CHECK: Manually checked to be the same value of the verifier entry program #[account( executable, @@ -110,14 +134,17 @@ pub struct Verify<'info> { )] pub verifier_program: UncheckedAccount<'info>, - /// CHECK: Only included to satisfy Anchor CPI requirements + /// CHECK: Only included to satisfy Anchor CPI Lifetime requirements pub system_program: Program<'info, System> } /// Initializes a new router with the given authority as owner /// +/// Creates a new router account initialized as a PDA and sets up initial +/// ownership and verifier count. +/// /// # Arguments -/// * `ctx` - The context containing validated accounts +/// * `ctx` - The Initialize context containing validated accounts /// /// # Returns /// * `Ok(())` if initialization is successful @@ -128,19 +155,24 @@ pub fn initialize(ctx: Context) -> Result<()> { Ok(()) } -/// Add a new verifier to the router +/// Adds a new verifier to the router's registry +/// +/// Creates a new verifier entry and associates it with the provided selector. +/// Only callable by the router's owner. Checks that the program being added to +/// the router is both Upgradable (via Loader V3) and has the Upgrade authority +/// set to the router PDA address. /// /// # Arguments -/// * `ctx` - The context containing validated accounts -/// * `selector` - The selector to associate with this verifier -/// * `verifier` - The public key of the verifier program +/// * `ctx` - The AddVerifier context containing validated accounts +/// * `selector` - The selector to associate with this verifier +/// (must be one higher then the current verifier count) /// /// # Returns /// * `Ok(())` if the verifier is successfully added -/// * `Err(RouterError::SelectorInUse)` if the selector is already in use -/// * `Err(RouterError::InvalidLoader)` if the verifier uses the wrong loader -/// * `Err(RouterError::InvalidAuthority)` if the router is not the upgrade authority -/// * `Err(RouterError::Overflow)` if adding the verifier would overflow the counter +/// * `Err(RouterError::SelectorInvalid)` if the selector is invalid (not exactly one greater +/// then current verifier count) +/// * `Err(RouterError::VerifierInvalidAuthority)` if the router PDA is not the upgrade authority +/// * `Err(RouterError::Overflow)` if adding the verifier would overflow the counter (highly unlikely) pub fn add_verifier(ctx: Context, selector: u32) -> Result<()> { // Verify the caller is the owner of the contract ctx.accounts @@ -162,16 +194,20 @@ pub fn add_verifier(ctx: Context, selector: u32) -> Result<()> { Ok(()) } -/// Verifies a proof using the specified verifier +/// Verifies a zero-knowledge proof using the specified verifier +/// +/// Routes the verification request to the appropriate verifier program +/// based on the selector. /// /// # Arguments -/// * `ctx` - The context containing validated accounts -/// * `seal` - The seal data to be verified +/// * `ctx` - The Verify context containing validated accounts +/// * `proof` - The proof to be verified /// * `image_id` - The image ID associated with the proof /// * `journal_digest` - The journal digest for verification /// /// # Returns -/// * `Ok(())` if the verification is successful +/// * `Ok(())` if the verification is successful +/// * `Err` if verification fails or the verifier returns an error pub fn verify( ctx: Context, proof: Proof, diff --git a/solana-verifier/programs/verifier_router/src/state/mod.rs b/solana-verifier/programs/verifier_router/src/state/mod.rs index 13d6940..beef9b0 100644 --- a/solana-verifier/programs/verifier_router/src/state/mod.rs +++ b/solana-verifier/programs/verifier_router/src/state/mod.rs @@ -3,8 +3,13 @@ use ownable::{Ownable, Ownership}; /// Main router account storing ownership and verifier count /// +/// This account maintains the registry of verifiers and implements ownership controls +/// for administrative operations. +/// +/// Verifier Count is tracked to prevent any verifier from reusing a previously stopped selector +/// /// # Fields -/// * `ownership` - Stores the current and pending owner information +/// * `ownership` - Stores the current and pending owner information using the Ownable trait /// * `verifier_count` - Total number of verifiers registered in the router #[account] #[derive(Ownable)] @@ -15,10 +20,12 @@ pub struct VerifierRouter { /// Account storing information about a registered verifier /// +/// Each verifier entry represents a deployed verifier program that can be used +/// for zero-knowledge proof verification. +/// /// # Fields /// * `selector` - Unique identifier for this verifier entry /// * `verifier` - Public key of the verifier program -/// * `is_active` - Boolean flag indicating if this verifier is currently active #[account] pub struct VerifierEntry { pub selector: u32, diff --git a/solana-verifier/scripts/acceptOwnership.ts b/solana-verifier/scripts/acceptOwnership.ts index 1aeacff..19e78e7 100644 --- a/solana-verifier/scripts/acceptOwnership.ts +++ b/solana-verifier/scripts/acceptOwnership.ts @@ -1,3 +1,43 @@ +/** + * # acceptOwnership.ts + * + * Completes the ownership transfer of the Risc0 Router by accepting the pending transfer. This script must be run by the new owner after the + * transferOwnership script has been executed by the current owner. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `ROUTER_ADDRESS` - (Optional) Address of the router program. If not set, uses the address from the latest build + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * yarn run accept + * + * # With custom router address + * ROUTER_ADDRESS=DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa \ + * yarn run accept + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * yarn run accept + * ``` + */ import { createLogger, createRpc, diff --git a/solana-verifier/scripts/addVerifier.ts b/solana-verifier/scripts/addVerifier.ts index 04e2380..8b7a067 100644 --- a/solana-verifier/scripts/addVerifier.ts +++ b/solana-verifier/scripts/addVerifier.ts @@ -1,3 +1,43 @@ +/** + * Adds a new verifier program to an existing Risc0 Router. This script handles changing the verifier's upgrade authority to the router and registering it in the router's registry. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `ROUTER_ADDRESS` - (Optional) Address of the router program. If not set, uses the address from the latest build + * - `VERIFIER_ADDRESS` - (Optional) Address of the verifier program to add. If not set, uses the Groth16 verifier address from the latest build + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * yarn run add + * + * # With custom addresses + * ROUTER_ADDRESS=DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa \ + * VERIFIER_ADDRESS=Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa \ + * yarn run add + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * yarn run add + * ``` + */ + import { createRpc, changeAuthority, @@ -19,7 +59,7 @@ async function runAddVerifier() { const owner = await getTransactionSigner(); logger.info( - `Using Router: ${routerAddress}, adding verifier ${verifierAddress}`, + `Using Router: ${routerAddress}, adding verifier ${verifierAddress}` ); const rpc = createRpc(); @@ -33,7 +73,7 @@ async function runAddVerifier() { rpc.rpc_subscription, verifierAddress, deployer, - routerPda.address, + routerPda.address ); logger.info("Adding the verifier to the Router"); @@ -42,7 +82,7 @@ async function runAddVerifier() { rpc.rpc_subscription, verifierAddress, routerAddress, - owner, + owner ); logger.info("Verifier was successfully added to the router"); diff --git a/solana-verifier/scripts/codma.ts b/solana-verifier/scripts/codma.ts index 61209c0..f2b9214 100644 --- a/solana-verifier/scripts/codma.ts +++ b/solana-verifier/scripts/codma.ts @@ -1,3 +1,44 @@ +/** + * Generates TypeScript client code from Anchor IDL files for the Risc0 Router and related programs. + * This script uses Codama to create strongly-typed TypeScript interfaces and functions for interacting with the Solana programs. + * + * ## Overview + * + * The script processes four IDL files: + * 1. Verifier Router IDL + * 2. Groth16 Verifier IDL + * 3. Test Bad Verifier IDL + * 4. Loader V3 IDL + * + * For each IDL, it generates corresponding TypeScript code in the following directories: + * - `./scripts/verify-router/` + * - `./scripts/groth16/` + * - `./scripts/bad-verifier/` + * - `./scripts/loaderV3/` + * + * ## Requirements + * + * The script expects the following IDL files to exist: + * - `../target/idl/verifier_router.json` + * - `../target/idl/groth_16_verifier.json` + * - `../target/idl/test_bad_verifier.json` + * - `../idl/loader-v3.json` + * + * ## Usage + * + * This script is typically run as part of the build process and is called by other scripts (like deploy.ts). + * However, it can be run manually to regenerate the TypeScript client code: + * + * ```bash + * yarn run client + * ``` + * + * ## Note + * + * - This script should be run after any changes to the Anchor programs to ensure the TypeScript client code stays in sync + * - The script will fail if any of the required IDL files are missing + * - Generated code should not be manually modified as it will be overwritten on the next run + */ import { createFromRoot } from "codama"; import { renderJavaScriptVisitor } from "@codama/renderers"; import { rootNodeFromAnchor } from "@codama/nodes-from-anchor"; diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index f07fe23..d657235 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -1,10 +1,48 @@ /** - * Risc0 Verifier Router and Initial Groth16 Verifier deployment script. - * This script will build, deploy, and initialize the Risc0 Prover Router - * and Initial Groth16 Verifier program on the Solana blockchain. You can modify how - * it operates by setting environment variables. This program requires the deployment - * address to have at least 5 SOL before it starts and the owner address that will - * initialize the programs to have at least 1 SOL. + * Builds, deploys, and initializes the Risc0 Verification Router and Initial Groth16 Verifier program on the Solana blockchain. + * This script handles the complete deployment pipeline including building programs, deploying them on-chain, and + * performing initial setup. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output + * ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `MINIMUM_DEPLOY_BALANCE` - (Optional) Minimum SOL balance required in deployer account. + * Defaults to 6 SOL + * - `MINIMUM_BALANCE` - (Optional) Minimum SOL balance required in owner account. Defaults to 1 SOL + * - `VERIFIABLE` - (Optional) Whether to build programs with verification enabled ["true" | "false"]. + * Defaults to false + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - (Optional) Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * Defaults to "sandbox" + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * yarn run deploy + * + * # With custom RPC endpoints + * RPC=https://api.mainnet-beta.solana.com \ + * RPC_SUBSCRIPTION=wss://api.mainnet-beta.solana.com \ + * yarn run deploy + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * yarn run deploy + * ``` */ import { build_cli, codama_cli, deploy_cli } from "./utils/deploy"; import { diff --git a/solana-verifier/scripts/estop.ts b/solana-verifier/scripts/estop.ts index e62c619..248a7dc 100644 --- a/solana-verifier/scripts/estop.ts +++ b/solana-verifier/scripts/estop.ts @@ -1,3 +1,48 @@ +/** + * Executes an emergency stop on a verifier in the Risc0 Router. This is an irreversible action that will permanently disable the specified verifier. + * The script includes multiple confirmation steps to prevent accidental execution. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `ROUTER_ADDRESS` - (Optional) Address of the router program. If not set, uses the address from the latest build + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Interactive Prompts + * + * The script will ask for: + * 1. Verifier selector number + * 2. Confirmation of the selector number + * 3. Explicit confirmation phrase "YES CALL EMERGENCY STOP" + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * yarn run estop + * + * # With custom router address + * ROUTER_ADDRESS=DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa \ + * yarn run estop + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * yarn run estop + * ``` + */ import { createLogger, createRpc, diff --git a/solana-verifier/scripts/renounceOwnership.ts b/solana-verifier/scripts/renounceOwnership.ts index e91dcec..7ddede7 100644 --- a/solana-verifier/scripts/renounceOwnership.ts +++ b/solana-verifier/scripts/renounceOwnership.ts @@ -1,3 +1,54 @@ +/** + * Permanently renounces ownership of the Risc0 Router. This is an irreversible action that will prevent any new verifiers from being added to the router. + * After renouncement, emergency stops can only be triggered by providing proof of exploitation. The script includes confirmation steps to prevent accidental + * execution. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `ROUTER_ADDRESS` - (Optional) Address of the router program. If not set, uses the address from the latest build + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Interactive Prompts + * + * The script will ask for: + * 1. Explicit confirmation phrase "YES CALL RENOUNCE OWNERSHIP" + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * yarn run renounce + * + * # With custom router address + * ROUTER_ADDRESS=DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa \ + * yarn run renounce + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * yarn run renounce + * ``` + * + * ## Warning + * + * This action is irreversible. Once ownership is renounced: + * - No new verifiers can be added to the router + * - Emergency stops can only be triggered with proof of exploit + * - No new owner can be assigned + */ import { createLogger, createRpc, @@ -15,10 +66,10 @@ const logger = createLogger(); async function ConfirmOperation() { console.log( - "Script will Renounce Ownership, Verify intent by answering the prompt:", + "Script will Renounce Ownership, Verify intent by answering the prompt:" ); const confirm = await rl.question( - 'Type "YES CALL RENOUNCE OWNERSHIP" to confirm: ', + 'Type "YES CALL RENOUNCE OWNERSHIP" to confirm: ' ); if (confirm !== "YES CALL RENOUNCE OWNERSHIP") { logger.error("User input did not match above confirmation, Exiting."); diff --git a/solana-verifier/scripts/transferOwnership.ts b/solana-verifier/scripts/transferOwnership.ts index 1a0f705..213ec39 100644 --- a/solana-verifier/scripts/transferOwnership.ts +++ b/solana-verifier/scripts/transferOwnership.ts @@ -1,3 +1,45 @@ +/** + * Initiates the transfer of ownership for the Risc0 Router to a new owner. This is the first step in a two-step ownership transfer process. After this script is run, + * the new owner must accept ownership using the acceptOwnership script. + * + * ## Environment Variables + * + * - `LOG_LEVEL` - (Optional) Log level for output ["silly" | "trace" | "debug" | "info" | "warn" | "error" | "fatal"]. Defaults to "info" + * - `ROUTER_ADDRESS` - (Optional) Address of the router program. If not set, uses the address from the latest build + * - `NEW_OWNER` - (Required) Public key of the new owner + * - `KEY_PAIR_FILE` - (Optional) Path to keypair file. Defaults to "~/.config/solana/id.json" + * - `RPC` - (Optional) RPC endpoint for Solana. Defaults to "http://localhost:8899" + * - `RPC_SUBSCRIPTION` - (Optional) WebSocket endpoint for Solana. Defaults to "ws://localhost:8900" + * + * ### Fireblocks Support (Optional) + * If using Fireblocks: + * - `FIREBLOCKS_PRIVATE_KEY_PATH` - Path to Fireblocks API private key + * - `FIREBLOCKS_API_KEY` - Fireblocks API key + * - `FIREBLOCKS_BASE_PATH` - Fireblocks API base path ["sandbox" | "us" | "eu" | "eu2"] + * - `FIREBLOCKS_ASSET_ID` - (Optional) Asset ID in Fireblocks. Defaults to "SOL_TEST" + * - `FIREBLOCKS_VAULT` - Vault account ID in Fireblocks + * + * ## Usage Example + * + * ```bash + * # Basic usage with local keypair + * NEW_OWNER=AnchoURaVvRYGHqrwEGqr83PUZjZYJu3VCqykkQxRPTo \ + * yarn run transfer + * + * # With custom router address + * ROUTER_ADDRESS=DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa \ + * NEW_OWNER=AnchoURaVvRYGHqrwEGqr83PUZjZYJu3VCqykkQxRPTo \ + * yarn run transfer + * + * # With Fireblocks + * FIREBLOCKS_PRIVATE_KEY_PATH=~/fireblocks_secret.key \ + * FIREBLOCKS_API_KEY=your-api-key \ + * FIREBLOCKS_BASE_PATH=sandbox \ + * FIREBLOCKS_VAULT=0 \ + * NEW_OWNER=AnchoURaVvRYGHqrwEGqr83PUZjZYJu3VCqykkQxRPTo \ + * yarn run transfer + * ``` + */ import { createLogger, createRpc, @@ -22,7 +64,7 @@ async function runTransferOwnership() { rpc.rpc_subscription, routerAddress, owner, - newOwner, + newOwner ); logger.info("Verifier Router Ownership Transfer Script Completed"); diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts index 3d7cc3d..311bfd7 100644 --- a/solana-verifier/scripts/utils/addVerifier.ts +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -18,19 +18,41 @@ import { getAddVerifierInstruction, } from "../verify-router"; - - const logger = createLogger(); +/** + * Adds a new verifier program to the router + * + * Registers a new verifier program by creating a verifier entry PDA and + * associating it with the router. The verifier program must have the router + * as its upgrade authority. + * + * @param rpc - Solana RPC client instance + * @param rpcSubscriptions - Solana RPC subscriptions instance + * @param verifierAddress - Address of the verifier program to add + * @param routerAddress - Address of the router program + * @param owner - Transaction signer with owner authority + * @returns Promise that resolves when verifier is added + * + * # Security Considerations + * * TransactionSigner (owner) Must be router owner + * * Verifier program must have router as upgrade authority + * * Selector is automatically assigned sequentially + * + * # Account Validation + * * Verifies router PDA + * * Creates verifier entry PDA with seeds = [b"verifier", selector_bytes] + * * Validates program data account ownership + */ export async function addVerifier( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, verifierAddress: Address, routerAddress: Address, - owner: TransactionSigner, + owner: TransactionSigner ): Promise { logger.info( - `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}`, + `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}` ); logger.debug(`Using the address: ${owner.address} as owner`); @@ -38,19 +60,19 @@ export async function addVerifier( const routerPDA = await getRouterPda(routerAddress); logger.debug( - `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}`, + `Router PDA address is: ${routerPDA.address} and the bump is: ${routerPDA.bump}` ); const routerData = await fetchVerifierRouter(rpc, routerPDA.address); logger.debug( - `Current verifier entry count is ${routerData.data.verifierCount}`, + `Current verifier entry count is ${routerData.data.verifierCount}` ); const selector = routerData.data.verifierCount + 1; logger.info( - `Using ${selector} as the selector for the verifier at address ${verifierAddress}`, + `Using ${selector} as the selector for the verifier at address ${verifierAddress}` ); const routerEntry = await getVerifierEntryPda(routerAddress, selector); @@ -68,7 +90,7 @@ export async function addVerifier( verifierProgram: verifierAddress, verifierProgramData: verifierProgramData.address, }, - { programAddress: routerAddress }, + { programAddress: routerAddress } ); await sendTransaction({ diff --git a/solana-verifier/scripts/utils/deploy.ts b/solana-verifier/scripts/utils/deploy.ts index 05ab319..cdbf7ea 100644 --- a/solana-verifier/scripts/utils/deploy.ts +++ b/solana-verifier/scripts/utils/deploy.ts @@ -1,15 +1,19 @@ import { promisify } from "util"; import process from "child_process"; -import { - verifiable, - Programs, -} from "./utils"; -import { - address, - Address, -} from "@solana/web3.js"; +import { verifiable, Programs } from "./utils"; +import { address, Address } from "@solana/web3.js"; const exec = promisify(process.exec); +/** + * Builds the Anchor project using the Anchor CLI + * + * Synchronizes program keys and builds the project with optional verifiable output. + * First runs 'anchor keys sync' to ensure program IDs match, then executes + * 'anchor build' with the --verifiable flag if specified in environment. + * + * @returns {Promise} Resolves when build is complete + * @throws If any anchor command fails during execution + */ export async function build_cli(): Promise { // Sync Keys before building await exec("anchor keys sync"); @@ -22,6 +26,16 @@ export async function build_cli(): Promise { } } +/** + * Regenerates TypeScript client code using Codama + * + * Executes the configured client script in Anchor.toml which uses Codama to + * generate TypeScript bindings from the program's IDL definitions. This keeps + * the client code in sync with any program changes. + * + * @returns {Promise} Resolves when code generation is complete + * @throws If the codama generation script fails + */ export async function codama_cli(): Promise { // Run the node command to regenerate the Codama TS Client Code await exec("anchor run client"); @@ -31,10 +45,26 @@ interface DeploymentOutput { programId: string; } +/** + * Deploys a Solana program using the Anchor CLI + * + * Deploys a specified program with configurable verification and upgradeability options. + * Uses 'anchor deploy' with JSON output format and optional flags for verification + * and program finalization. + * + * @param {Programs} program - The program to deploy (from Programs enum) + * @param {boolean} verify - Whether to verify the deployed program on-chain + * @param {boolean} upgradable - Whether to deploy as an upgradeable program + * @returns {Promise>} The address of the deployed program + * @throws If deployment fails or if JSON output cannot be parsed + * + * @example + * const address = await deploy_cli(Programs.VerifierRouter, true, true); + */ export async function deploy_cli( program: Programs, verify: boolean, - upgradable: boolean, + upgradable: boolean ): Promise> { const command = [`anchor deploy --program-name ${program}`]; diff --git a/solana-verifier/scripts/utils/estop.ts b/solana-verifier/scripts/utils/estop.ts index f0fb295..0506082 100644 --- a/solana-verifier/scripts/utils/estop.ts +++ b/solana-verifier/scripts/utils/estop.ts @@ -23,18 +23,42 @@ import { SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS } from "../loaderV3"; const logger = createLogger(); +/** + * Executes an emergency stop of a verifier program by its owner + * + * CRITICAL: This is an irreversible action that will permanently disable the verifier. + * The function includes a 5-second delay to prevent accidental execution. + * + * This operation will: + * 1. Close the verifier program account + * 2. Close the verifier entry account + * 3. Permanently disable the verifier's selector + * 4. Return rent from closed accounts to the owner + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program + * @param {TransactionSigner} owner - The owner authorized to emergency stop the verifier + * @param {number} selector - The selector identifying the verifier to stop + * + * @returns {Promise} Resolves when the emergency stop is confirmed + * @throws If the transaction fails or if the owner lacks proper authorization + * + * @security This function requires owner authorization and affects critical program state + * @warning Once executed, this action cannot be undone. The selector cannot be reused. + */ export async function estopByOwner( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, routerAddress: Address, owner: TransactionSigner, - selector: number, + selector: number ): Promise { logger.warn( - "EMERGENCY STOP HAS BEEN STARTED, THIS IS IRREVERSABLE...Program Will sleep for 5 seconds Kill program immediatly if not intentional, attempting to terminate a verifier!", + "EMERGENCY STOP HAS BEEN STARTED, THIS IS IRREVERSABLE...Program Will sleep for 5 seconds Kill program immediatly if not intentional, attempting to terminate a verifier!" ); logger.info( - `Emeregency Stop attempting to stop verifier with Selector: ${selector} on router ${routerAddress}`, + `Emeregency Stop attempting to stop verifier with Selector: ${selector} on router ${routerAddress}` ); await sleep(5000); // Sleep for 5 seconds in case this was an accident @@ -50,7 +74,7 @@ export async function estopByOwner( const verifierProgramData = await getProgramDataAddress(verifierAddress); logger.info( - `Attempting to terminate verifier with address: ${verifierAddress}`, + `Attempting to terminate verifier with address: ${verifierAddress}` ); const estopInstruction = getEmergencyStopInstruction( @@ -65,7 +89,7 @@ export async function estopByOwner( }, { programAddress: routerAddress, - }, + } ); await sendTransaction({ diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts index a97f576..670e8a1 100644 --- a/solana-verifier/scripts/utils/fireblocksSigner.ts +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -10,13 +10,6 @@ import { usingFireblocks, } from "./utils"; import { address } from "@solana/addresses"; -// import { ApiBaseUrl } from "solana_fireblocks_web3_provider/src/types"; -// import { -// FireblocksSDK, -// PeerType, -// TransactionArguments, -// TransactionOperation, -// } from "fireblocks-sdk"; import { BasePath, CreateTransactionResponse, @@ -28,14 +21,27 @@ import { import { getBase16Codec, SignatureBytes } from "@solana/web3.js"; import { PeerType } from "fireblocks-sdk"; +const logger = createLogger(); + export type FireBlocksSigner = MessagePartialSigner & TransactionPartialSigner & { fireblocks: Fireblocks; }; -const logger = createLogger(); - +/** + * Configuration interface for Fireblocks wallet integration + * + * Contains the necessary credentials and parameters for initializing a connection + * to the Fireblocks API and accessing a specific vault account. + * + * @interface + * @property {string} apiSecret - RSA private key for API authentication + * @property {string} apiKey - Fireblocks API key for authentication + * @property {BasePath} basePath - API endpoint (Sandbox/US/EU/EU2) + * @property {string} assetId - Asset identifier (e.g., "SOL_TEST" for testnet) + * @property {string} vaultAccountId - ID of the Fireblocks vault account to use + */ export interface FireblocksConfig { apiSecret: string; apiKey: string; @@ -44,6 +50,19 @@ export interface FireblocksConfig { vaultAccountId: string; } +/** + * Converts a string input to a Fireblocks BasePath enum value + * + * Maps input strings to the appropriate API endpoint environment. + * Defaults to Sandbox if the input doesn't match any known environment. + * + * @param {string} value - The base path string to parse ("us", "eu", "eu2", "sandbox") + * @returns {BasePath} The corresponding BasePath enum value + * + * @example + * const path = parseBasePath("us"); // Returns BasePath.US + * const defaultPath = parseBasePath("invalid"); // Returns BasePath.Sandbox + */ export function parseBasePath(value: string): BasePath { switch (value.toLowerCase()) { case "us": @@ -53,11 +72,36 @@ export function parseBasePath(value: string): BasePath { case "eu2": return BasePath.EU2; case "sandbox": + return BasePath.Sandbox; default: + if (value == "") { + logger.info( + "Fireblocks Base Path value was not set, defaulting to sandbox" + ); + } else { + logger.warn( + "Fireblocks Base Path value could not be parsed, defaulting to sandbox" + ); + } return BasePath.Sandbox; } } +/** + * Creates a Solana message/transaction signer using Fireblocks credentials + * + * Initializes a connection to Fireblocks and creates a signer that implements + * both MessagePartialSigner and TransactionPartialSigner interfaces. The signer + * uses the Fireblocks API to sign Solana transactions and messages. + * + * @param {FireblocksConfig} config - Fireblocks configuration parameters + * @returns {Promise} A signer that can sign Solana transactions and messages + * @throws If unable to initialize Fireblocks connection or fetch vault addresses + * + * @security Handles sensitive signing operations through Fireblocks HSM + * @security Requires RAW Signing feature which is disabled by fireblocks without contacting them first + * @see waitForSignature - Internal helper method for polling signature status + */ export async function createSignerFromFireblocksConfig( config: FireblocksConfig ): Promise { @@ -171,6 +215,25 @@ export async function createSignerFromFireblocksConfig( }; } +/** + * Factory function that creates a Fireblocks signer based on environment configuration + * + * Attempts to create a Fireblocks signer using environment variables. Returns null + * if Fireblocks is not configured or if required configuration is missing. + * + * @returns {Promise} A configured Fireblocks signer or null if + * Fireblocks is not configured + * @throws If environment variables exist but are invalid or if connection fails + * + * Required environment variables: + * - FIREBLOCKS_PRIVATE_KEY_PATH + * - FIREBLOCKS_API_KEY + * - FIREBLOCKS_VAULT + * + * Optional environment variables: + * - FIREBLOCKS_BASE_PATH (defaults to "sandbox") + * - FIREBLOCKS_ASSET_ID (defaults to "SOL_TEST") + */ export async function getFireblocksSigner(): Promise { if (!usingFireblocks()) { return null; diff --git a/solana-verifier/scripts/utils/init.ts b/solana-verifier/scripts/utils/init.ts index 7d6d7ef..c9d9f08 100644 --- a/solana-verifier/scripts/utils/init.ts +++ b/solana-verifier/scripts/utils/init.ts @@ -9,6 +9,30 @@ import { } from "@solana/web3.js"; import { getInitializeInstruction } from "../verify-router"; +/** + * Initializes a new verifier router program instance on Solana + * + * Creates and initializes a Program Derived Address (PDA) that will serve as the router + * account for managing verifier programs. The router is initialized with the provided + * owner as the authority who can add verifiers and perform administrative operations. + * + * The initialization includes: + * - Creating a router PDA with seeds = [b"router"] + * - Setting up initial ownership configuration + * - Initializing verifier count to 0 + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program to initialize + * @param {TransactionSigner} owner - The account that will be set as the initial owner + * + * @returns {Promise} Resolves when initialization is confirmed on-chain + * @throws If PDA creation fails or if the initialization transaction fails + * + * @security This sets up critical program state and ownership - ensure owner address is correct + * @notice Only needs to be called once when deploying a new router program + * @warn Will fail if program has been initialized before + */ export async function initializeRouter( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts index b7727ef..4887268 100644 --- a/solana-verifier/scripts/utils/ownership.ts +++ b/solana-verifier/scripts/utils/ownership.ts @@ -17,6 +17,27 @@ import { createLogger, getRouterPda, sendTransaction, sleep } from "./utils"; const logger = createLogger(); +/** + * Initiates the transfer of router ownership to a new address + * + * This is part of a two-step ownership transfer process: + * 1. Current owner initiates transfer by calling this function + * 2. New owner must accept the transfer by calling acceptOwnership + * + * The transfer remains pending until accepted or cancelled. + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program + * @param {TransactionSigner} owner - Current owner initiating the transfer + * @param {Address} newOwner - Address that will receive ownership rights + * + * @returns {Promise} Resolves when transfer initiation is confirmed + * @throws If caller is not the current owner or if transaction fails + * + * @security Requires current owner's signature + * @see acceptOwnership - Required follow-up action by new owner + */ export async function transferOwnership( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, @@ -56,6 +77,25 @@ export async function transferOwnership( ); } +/** + * Completes a pending ownership transfer by the new owner accepting the role + * + * Second step of the two-step ownership transfer process. The new owner must + * explicitly accept ownership by calling this function. Upon acceptance: + * - Previous owner loses all administrative rights + * - New owner gains full administrative control + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program + * @param {TransactionSigner} newOwner - The pending owner accepting the transfer + * + * @returns {Promise} Resolves when ownership transfer is completed + * @throws If caller is not the pending owner or if no transfer is pending + * + * @security Changes critical program authority + * @notice This action gives full administrative control to the new owner + */ export async function acceptOwnership( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, @@ -91,6 +131,25 @@ export async function acceptOwnership( ); } +/** + * Cancels a pending ownership transfer + * + * Can be called by either the current owner or the pending owner to + * cancel a pending ownership transfer. After cancellation: + * - Current owner retains all rights + * - Pending owner can no longer accept the transfer + * - A new transfer must be initiated for any future ownership change + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program + * @param {TransactionSigner} authority - Either current owner or pending owner + * + * @returns {Promise} Resolves when cancellation is confirmed + * @throws If caller is neither current nor pending owner, or if no transfer is pending + * + * @notice Can be called by either current or pending owner + */ export async function cancelTransfer( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, @@ -128,6 +187,28 @@ export async function cancelTransfer( ); } +/** + * Permanently renounces ownership of the router program + * + * CRITICAL: This is an irreversible action that permanently removes owner authority. + * After renouncement: + * - No new verifiers can be added + * - Emergency stops can only be triggered by proof of exploit + * - No future owner can be set + * + * Includes a 5-second delay to prevent accidental execution. + * + * @param {Rpc} rpc - RPC connection to Solana + * @param {RpcSubscriptions} rpcSubscriptions - WebSocket connection for transaction confirmation + * @param {Address} routerAddress - Address of the verifier router program + * @param {TransactionSigner} owner - Current owner renouncing their rights + * + * @returns {Promise} Resolves when renouncement is confirmed + * @throws If caller is not the current owner or if transaction fails + * + * @security This is an irreversible action + * @warning After this action, certain program features become permanently unavailable + */ export async function renounceOwnership( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 7199e81..875f188 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -50,6 +50,14 @@ import { Logger } from "tslog"; dotenv.config(); const logger = createLogger(); +/** + * Creates a configured logger instance + * + * Initializes a logger with the appropriate log level based on environment + * configuration. Defaults to INFO level if not specified. + * + * @returns Configured Logger instance + */ export function createLogger() { const logLevel = process.env.LOG_LEVEL || "info"; let minLevel: number; @@ -104,6 +112,17 @@ type BlockhashTransaction = BaseTransactionMessage & ITransactionMessageWithFeePayer & TransactionMessageWithBlockhashLifetime; +/** + * Arguments Interface for sending transactions with the sendTransaction + * utility function + * + * @template TTransaction - Type extending BlockhashTransaction + * @property rpc - Solana RPC client instance + * @property rpcSubscriptions - Solana RPC subscriptions instance + * @property feePayer - TransactionSigner that will pay for the transaction + * @property instruction - Transaction instruction to be executed + * @property commitment - Optional commitment level for transaction confirmation + */ export interface SendTransactionParams< TTransaction extends BlockhashTransaction, > { @@ -114,6 +133,17 @@ export interface SendTransactionParams< commitment?: Commitment; } +/** + * Creates and sends a transaction with the provided instruction + * + * @template TTransaction - Type extending BlockhashTransaction + * @param params - Parameters for sending the transaction + * @returns Promise that resolves when transaction is confirmed + * + * # Security Considerations + * * Requires a valid feePayer with sufficient balance + * * Uses latest blockhash for transaction lifetime + */ export async function sendTransaction< TTransaction extends BlockhashTransaction, >({ @@ -157,10 +187,32 @@ export async function sendTransaction< await sendAndConfirmTransaction(signedTransaction, { commitment }); } +/** + * Utility function to pause execution + * + * @param ms - Number of milliseconds to sleep + * @returns Promise that resolves after the specified delay + */ export async function sleep(ms: number): Promise { return new Promise((res) => setTimeout(res, ms)); } +/** + * Changes the authority of a program + * + * Updates the upgrade authority of a program to a new address. Requires + * signature from current authority. + * + * @param rpc - Solana RPC client instance + * @param rpcSubscriptions - Solana RPC subscriptions instance + * @param programAddress - Address of program to modify + * @param currentAuthority - Current authority TransactionSigner + * @param newAuthority - New authority address + * + * # Security Considerations + * * Requires TransactionSigner from current authority + * * Updates program data account authority + */ export async function changeAuthority( rpc: Rpc, rpcSubscriptions: RpcSubscriptions, @@ -194,11 +246,24 @@ export async function changeAuthority( logger.info("Transaction confirmed, upgrade authority changed"); } -// Code taken from https://solana.com/developers/cookbook/development/load-keypair-from-file +/** + * Loads the default Solana keypair + * + * Reads the default keypair from ~/.config/solana/id.json + * + * @returns KeyPairSigner loaded from default location + */ export async function loadDefaultKeypair(): Promise> { return await loadKeypairFromFile("~/.config/solana/id.json"); } +/** + * Loads a keypair from a specified file path + * + * @param filePath - Path to keypair file + * @returns KeyPairSigner loaded from file + */ +// Code taken from https://solana.com/developers/cookbook/development/load-keypair-from-file export async function loadKeypairFromFile( filePath: string ): Promise> { @@ -216,11 +281,27 @@ export async function loadKeypairFromFile( ); return keypairSigner; } + +/** + * Interface representing a Program Derived Address with bump seed + * + * @property address - The derived address + * @property bump - Bump seed used in derivation + */ export interface PDA { address: Address; bump: ProgramDerivedAddressBump; } +/** + * Derives the router PDA for a given router program + * + * @param routerAddress - Address of the router program + * @returns PDA info containing derived address and bump + * + * # Seeds + * * ["router"] + */ export async function getRouterPda( routerAddress: Address ): Promise { @@ -234,6 +315,16 @@ export async function getRouterPda( }; } +/** + * Derives the verifier entry PDA for a given selector + * + * @param routerAddress - Address of the router program + * @param selector - Selector number for the verifier + * @returns PDA info containing derived address and bump + * + * # Seeds + * * ["verifier", selector_bytes] + */ export async function getVerifierEntryPda( routerAddress: Address, selector: number @@ -250,6 +341,15 @@ export async function getVerifierEntryPda( }; } +/** + * Derives the program data address for an upgradeable program + * + * @param programAddress - Address of the program + * @returns PDA info containing derived address and bump + * + * # Seeds + * * [program_address_bytes] + */ export async function getProgramDataAddress( programAddress: Address ): Promise { @@ -264,6 +364,13 @@ export async function getProgramDataAddress( }; } +/** + * Gets the local keypair for use in scripts based upon either the environment values + * or the system default. + * + * @note Uses KEY_PAIR_FILE environment variable + * @returns KeyPairSigner for signing transaction on the local machine + */ export async function getLocalKeypair(): Promise> { const keyfile = process.env.KEY_PAIR_FILE; if (keyfile) { @@ -272,6 +379,14 @@ export async function getLocalKeypair(): Promise> { return loadDefaultKeypair(); } +/** + * Gets the configured transaction signer + * + * Returns either a Fireblocks signer if configured, or falls back + * to local keypair. + * + * @returns TransactionSigner to use for signing + */ export async function getTransactionSigner(): Promise { if (usingFireblocks()) { const signer = await getFireblocksSigner(); @@ -282,6 +397,12 @@ export async function getTransactionSigner(): Promise { return await getLocalKeypair(); } +/** + * Gets the router program address from environment or defaults + * + * @notice Uses ROUTER_ADDRESS environment variable + * @returns Address of the router program to use + */ export function getRouterAddress(): Address { const router_env = process.env.ROUTER_ADDRESS; if (router_env) { @@ -293,6 +414,11 @@ export function getRouterAddress(): Address { return VERIFIER_ROUTER_PROGRAM_ADDRESS; } +/** + * Gets the verifier program address from environment or defaults + * @notice Uses VERIFIER_ADDRESS environment variable + * @returns Address of the verifier program to use + */ export function getVerifierAddress(): Address { const verifier_env = process.env.VERIFIER_ADDRESS; if (verifier_env) { @@ -304,6 +430,12 @@ export function getVerifierAddress(): Address { return GROTH16_VERIFIER_PROGRAM_ADDRESS; } +/** + * Gets the new owner address from environment + * + * @returns Address specified as new owner + * @throws If NEW_OWNER environment variable is not set + */ export function getNewOwnerAddress(): Address { const newOwner_env = process.env.NEW_OWNER; if (!newOwner_env) { @@ -314,6 +446,13 @@ export function getNewOwnerAddress(): Address { return address(newOwner_env); } +/** + * Loads the owner address from environment or defaults to the + * local keypair. + * + * @notice Uses ROUTER_OWNER environment variable + * @returns Address of the owner to use + */ export async function loadOwnerAddress(): Promise> { const owner = process.env.ROUTER_OWNER; if (owner) { @@ -324,6 +463,22 @@ export async function loadOwnerAddress(): Promise> { return keypair.address; } +/** + * Multiplies a floating point number with a bigint while maintaining precision + * + * Used for accurate SOL calculations by converting to Decimal for the multiplication + * and then back to bigint. Handles the conversion of SOL amounts to lamports. + * + * @param float - Floating point multiplier + * @param value - Bigint value to multiply + * @returns Result as bigint with correct precision + * + * # Example + * ```typescript + * // Convert 1.5 SOL to lamports + * const lamports = lamports(floatMulSol(1.5, LAMPORTS_PER_SOL)) + * ``` + */ function floatMulSol(float: number, value: bigint): bigint { const floatDecimal = new Decimal(float); const valueDecimal = new Decimal(value.toString()); @@ -332,22 +487,50 @@ function floatMulSol(float: number, value: bigint): bigint { return BigInt(roundedResult); } +/** + * Gets the minimum balance required for deployment + * defaults to 6 SOL + * + * @notice Uses the MINIMUM_DEPLOY_BALANCE environment variable + * @returns Lamports representing minimum required balance + */ export function loadMinimumDeployBalance(): Lamports { const balance_env = process.env.MINIMUM_DEPLOY_BALANCE; const balance = parseFloat(balance_env) || 6; return lamports(floatMulSol(balance, LAMPORTS_PER_SOL)); } +/** + * Gets the minimum balance required for script execution + * defaults to 1 SOL + * + * @notice Uses the MINIMUM_BALANCE environment variable + * @returns Lamports representing minimum required balance + */ export function loadMinimumScriptBalance(): Lamports { const balance_env = process.env.MINIMUM_BALANCE; const balance = parseFloat(balance_env) || 1; return lamports(floatMulSol(balance, LAMPORTS_PER_SOL)); } +/** + * Checks if Fireblocks signing has been configured + * + * @returns true if Fireblocks credentials are configured + */ export function usingFireblocks(): boolean { return getFireblocksCredentials() !== null; } +/** + * Gets Fireblocks configuration from environment + * @notice Uses the FIREBLOCKS_PRIVATE_KEY_PATH environment variable + * @notice Uses the FIREBLOCKS_API_KEY environment variable + * @notice Uses the FIREBLOCKS_VAULT environment variable + * @notice Uses the FIREBLOCKS_BASE_PATH *optional* environment variable + * @notice Uses the FIREBLOCKS_ASSET_ID *optional* environment variable + * @returns FireblocksConfig if all required variables are set, null otherwise + */ export async function getFireblocksCredentials(): Promise { const apiSecretPath = process.env.FIREBLOCKS_PRIVATE_KEY_PATH; const apiKey = process.env.FIREBLOCKS_API_KEY; @@ -410,6 +593,12 @@ export async function getFireblocksCredentials(): Promise, RpcTransport>; rpc_subscription: RpcSubscriptionsFromTransport< @@ -429,6 +624,16 @@ export interface SolanaRpcInformation { >; } +/** + * Parses a string into a boolean value + * + * Converts various string representations to boolean values. + * Returns true for "true", "on", and "yes" (case-insensitive). + * Returns false for empty strings or any other values. + * + * @param value - String to parse + * @returns Parsed boolean value + */ function parseBoolean(value: string): boolean { if (!value) { return false; @@ -436,6 +641,20 @@ function parseBoolean(value: string): boolean { return ["true", "on", "yes"].includes(value.toLowerCase()); } +/** + * Creates RPC connections to Solana node + * + * Initializes both standard RPC and WebSocket subscription connections + * using configuration from environment. + * + * Defaults to "http://localhost:8899" for the rpc entry and "ws://localhost:8900" + * for the rpc_subscription address + * + * + * @notice Uses the RPC environment variable + * @notice Uses the RPC_SUBSCRIPTION environment variable + * @returns Configured RPC connections + */ export function createRpc(): SolanaRpcInformation { const rpcAddress = process.env.RPC || "http://localhost:8899"; const subscriptionAddress = diff --git a/solana-verifier/scripts/verify-router/instructions/addVerifier.ts b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts index e93d116..2928a5f 100644 --- a/solana-verifier/scripts/verify-router/instructions/addVerifier.ts +++ b/solana-verifier/scripts/verify-router/instructions/addVerifier.ts @@ -132,11 +132,20 @@ export type AddVerifierAsyncInput< TAccountAuthority extends string = string, TAccountSystemProgram extends string = string, > = { + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router?: Address; + /** The new verifier entry to be created which must have a selector in sequential order */ verifierEntry?: Address; + /** Program data account (Data of account authority from LoaderV3) of the verifier being added */ verifierProgramData?: Address; + /** + * The program executable code account of the verifier program to be added + * Must be an unchecked account because any program ID can be here + */ verifierProgram: Address; + /** The owner of the router which must sign this transaction */ authority: TransactionSigner; + /** Required for account initialization */ systemProgram?: Address; selector: AddVerifierInstructionDataArgs['selector']; }; @@ -269,11 +278,20 @@ export type AddVerifierInput< TAccountAuthority extends string = string, TAccountSystemProgram extends string = string, > = { + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: Address; + /** The new verifier entry to be created which must have a selector in sequential order */ verifierEntry: Address; + /** Program data account (Data of account authority from LoaderV3) of the verifier being added */ verifierProgramData: Address; + /** + * The program executable code account of the verifier program to be added + * Must be an unchecked account because any program ID can be here + */ verifierProgram: Address; + /** The owner of the router which must sign this transaction */ authority: TransactionSigner; + /** Required for account initialization */ systemProgram?: Address; selector: AddVerifierInstructionDataArgs['selector']; }; @@ -371,11 +389,21 @@ export type ParsedAddVerifierInstruction< > = { programAddress: Address; accounts: { + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: TAccountMetas[0]; + /** The new verifier entry to be created which must have a selector in sequential order */ verifierEntry: TAccountMetas[1]; + /** Program data account (Data of account authority from LoaderV3) of the verifier being added */ verifierProgramData: TAccountMetas[2]; + /** + * The program executable code account of the verifier program to be added + * Must be an unchecked account because any program ID can be here + */ + verifierProgram: TAccountMetas[3]; + /** The owner of the router which must sign this transaction */ authority: TAccountMetas[4]; + /** Required for account initialization */ systemProgram: TAccountMetas[5]; }; data: AddVerifierInstructionData; diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts index 2ae89c4..cd6183c 100644 --- a/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStop.ts @@ -139,20 +139,32 @@ export type EmergencyStopAsyncInput< TAccountBpfLoaderUpgradableProgram extends string = string, TAccountSystemProgram extends string = string, > = { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router?: Address; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ verifierEntry?: Address; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ authority: TransactionSigner; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: Address; /** The Program Data account of the verifier to be closed */ verifierProgramData?: Address; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ bpfLoaderUpgradableProgram: Address; + /** Required because we are closing accounts */ systemProgram?: Address; selector: EmergencyStopInstructionDataArgs['selector']; }; @@ -292,20 +304,32 @@ export type EmergencyStopInput< TAccountBpfLoaderUpgradableProgram extends string = string, TAccountSystemProgram extends string = string, > = { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: Address; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ verifierEntry: Address; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ authority: TransactionSigner; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: Address; /** The Program Data account of the verifier to be closed */ verifierProgramData: Address; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ bpfLoaderUpgradableProgram: Address; + /** Required because we are closing accounts */ systemProgram?: Address; selector: EmergencyStopInstructionDataArgs['selector']; }; @@ -409,21 +433,36 @@ export type ParsedEmergencyStopInstruction< > = { programAddress: Address; accounts: { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: TAccountMetas[0]; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ + verifierEntry: TAccountMetas[1]; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ + authority: TAccountMetas[2]; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: TAccountMetas[3]; /** The Program Data account of the verifier to be closed */ verifierProgramData: TAccountMetas[4]; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ + bpfLoaderUpgradableProgram: TAccountMetas[5]; + /** Required because we are closing accounts */ systemProgram: TAccountMetas[6]; }; data: EmergencyStopInstructionData; diff --git a/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts index 343df50..69f01d2 100644 --- a/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts +++ b/solana-verifier/scripts/verify-router/instructions/emergencyStopWithProof.ts @@ -106,15 +106,11 @@ export type EmergencyStopWithProofInstructionData = { discriminator: ReadonlyUint8Array; selector: number; proof: Proof; - imageId: ReadonlyUint8Array; - journalDigest: ReadonlyUint8Array; }; export type EmergencyStopWithProofInstructionDataArgs = { selector: number; proof: ProofArgs; - imageId: ReadonlyUint8Array; - journalDigest: ReadonlyUint8Array; }; export function getEmergencyStopWithProofInstructionDataEncoder(): Encoder { @@ -123,8 +119,6 @@ export function getEmergencyStopWithProofInstructionDataEncoder(): Encoder ({ ...value, @@ -138,8 +132,6 @@ export function getEmergencyStopWithProofInstructionDataDecoder(): Decoder = { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router?: Address; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ verifierEntry?: Address; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ authority: TransactionSigner; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: Address; /** The Program Data account of the verifier to be closed */ verifierProgramData?: Address; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ bpfLoaderUpgradableProgram: Address; + /** Required because we are closing accounts */ systemProgram?: Address; selector: EmergencyStopWithProofInstructionDataArgs['selector']; proof: EmergencyStopWithProofInstructionDataArgs['proof']; - imageId: EmergencyStopWithProofInstructionDataArgs['imageId']; - journalDigest: EmergencyStopWithProofInstructionDataArgs['journalDigest']; }; export async function getEmergencyStopWithProofInstructionAsync< @@ -318,25 +320,35 @@ export type EmergencyStopWithProofInput< TAccountBpfLoaderUpgradableProgram extends string = string, TAccountSystemProgram extends string = string, > = { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: Address; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ verifierEntry: Address; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ authority: TransactionSigner; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: Address; /** The Program Data account of the verifier to be closed */ verifierProgramData: Address; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ bpfLoaderUpgradableProgram: Address; + /** Required because we are closing accounts */ systemProgram?: Address; selector: EmergencyStopWithProofInstructionDataArgs['selector']; proof: EmergencyStopWithProofInstructionDataArgs['proof']; - imageId: EmergencyStopWithProofInstructionDataArgs['imageId']; - journalDigest: EmergencyStopWithProofInstructionDataArgs['journalDigest']; }; export function getEmergencyStopWithProofInstruction< @@ -438,21 +450,36 @@ export type ParsedEmergencyStopWithProofInstruction< > = { programAddress: Address; accounts: { - /** The router account containing ownership and verifier registry */ + /** The router account PDA managing verifiers and required Upgrade Authority address of verifier */ router: TAccountMetas[0]; - /** The verifier entry to be closed */ + /** + * The verifier entry of the program to be stopped. + * This entry will be closed and refunded to the caller on successful stop + */ + verifierEntry: TAccountMetas[1]; - /** The authority attempting the emergency stop */ + /** + * The authority attempting the emergency stop (either the router owner OR the person presenting proof of exploit) + * The authority will get the rent refund of both the program account of the verifier and the verifierEntry account + */ + authority: TAccountMetas[2]; /** - * The program account of the verifier to be used - * Address is verified against VerifierEntry + * The program account of the verifier to be used Address is verified against VerifierEntry + * Must be Unchecked as there could be any program ID here. + * This account will be closed by a CPI call to the Loader V3 and rent refunded to the authority */ verifierProgram: TAccountMetas[3]; /** The Program Data account of the verifier to be closed */ verifierProgramData: TAccountMetas[4]; + /** + * This is the Loader V3 BPF Upgrade program, Not written in Anchor so we cannot use the + * CPI extensions to automatically generate a secure CPI call and must do so manually + */ + bpfLoaderUpgradableProgram: TAccountMetas[5]; + /** Required because we are closing accounts */ systemProgram: TAccountMetas[6]; }; data: EmergencyStopWithProofInstructionData; diff --git a/solana-verifier/scripts/verify-router/instructions/initialize.ts b/solana-verifier/scripts/verify-router/instructions/initialize.ts index 7c3fc21..54777f6 100644 --- a/solana-verifier/scripts/verify-router/instructions/initialize.ts +++ b/solana-verifier/scripts/verify-router/instructions/initialize.ts @@ -101,8 +101,8 @@ export type InitializeAsyncInput< TAccountSystemProgram extends string = string, > = { /** - * The router account to be initialized - * Space allocated for discriminator + owner + option + count + * The router account PDA to be initialized + * Space allocated for discriminator + owner (Pubkey) + pending_owner: (Option) + count (u32) */ router?: Address; /** The authority initializing and paying for the router */ @@ -187,8 +187,8 @@ export type InitializeInput< TAccountSystemProgram extends string = string, > = { /** - * The router account to be initialized - * Space allocated for discriminator + owner + option + count + * The router account PDA to be initialized + * Space allocated for discriminator + owner (Pubkey) + pending_owner: (Option) + count (u32) */ router: Address; /** The authority initializing and paying for the router */ @@ -262,8 +262,8 @@ export type ParsedInitializeInstruction< programAddress: Address; accounts: { /** - * The router account to be initialized - * Space allocated for discriminator + owner + option + count + * The router account PDA to be initialized + * Space allocated for discriminator + owner (Pubkey) + pending_owner: (Option) + count (u32) */ router: TAccountMetas[0]; diff --git a/solana-verifier/scripts/verify-router/instructions/verify.ts b/solana-verifier/scripts/verify-router/instructions/verify.ts index 8a330c5..1ffcf30 100644 --- a/solana-verifier/scripts/verify-router/instructions/verify.ts +++ b/solana-verifier/scripts/verify-router/instructions/verify.ts @@ -133,14 +133,15 @@ export type VerifyAsyncInput< TAccountVerifierProgram extends string = string, TAccountSystemProgram extends string = string, > = { - /** The router account containing the verifier registry */ + /** The router account PDA managing verifiers */ router?: Address; + /** The verifier entry to use, validated using PDA derivation */ + verifierEntry?: Address; /** - * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", selector_bytes] + * The verifier program to be invoked + * Must match the address of the program listed in the verifier entry of the specific selector + * Must be an unchecked account because any program ID can be here */ - verifierEntry?: Address; - /** The verifier Program account that is matched to the verifier entry */ verifierProgram: Address; systemProgram?: Address; selector: VerifyInstructionDataArgs['selector']; @@ -250,14 +251,15 @@ export type VerifyInput< TAccountVerifierProgram extends string = string, TAccountSystemProgram extends string = string, > = { - /** The router account containing the verifier registry */ + /** The router account PDA managing verifiers */ router: Address; + /** The verifier entry to use, validated using PDA derivation */ + verifierEntry: Address; /** - * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", selector_bytes] + * The verifier program to be invoked + * Must match the address of the program listed in the verifier entry of the specific selector + * Must be an unchecked account because any program ID can be here */ - verifierEntry: Address; - /** The verifier Program account that is matched to the verifier entry */ verifierProgram: Address; systemProgram?: Address; selector: VerifyInstructionDataArgs['selector']; @@ -344,15 +346,16 @@ export type ParsedVerifyInstruction< > = { programAddress: Address; accounts: { - /** The router account containing the verifier registry */ + /** The router account PDA managing verifiers */ router: TAccountMetas[0]; + /** The verifier entry to use, validated using PDA derivation */ + verifierEntry: TAccountMetas[1]; /** - * The verifier entry to use, validated using PDA derivation - * Seeds are ["verifier", selector_bytes] + * The verifier program to be invoked + * Must match the address of the program listed in the verifier entry of the specific selector + * Must be an unchecked account because any program ID can be here */ - verifierEntry: TAccountMetas[1]; - /** The verifier Program account that is matched to the verifier entry */ verifierProgram: TAccountMetas[2]; systemProgram: TAccountMetas[3]; }; diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index b7f7e41..0928fe0 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -382,12 +382,20 @@ describe("verifier-router", () => { }); it("should not allow any user to call e-stop if they do not have a valid proof the verifier is broken", async () => { + const piA = new Uint8Array(64); + piA[0] = 42; + + // Test Proof for the Test Bad Verifier + let badProof: Proof = { + piA, // Non-Empty 64 Byte array + piB: new Array(128), // Empty 128 byte array + piC: new Uint8Array(64), // Empty 64 byte array + }; + const estopProofInstruction = getEmergencyStopWithProofInstruction({ authority: notOwner, bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, - imageId: badImageId, - journalDigest: emptyJournalDigest, - proof: emptyProof, + proof: badProof, router: routerAddress, selector: TEST_BAD_SELECTOR, verifierEntry: badVerifierPDAAddress, @@ -420,8 +428,6 @@ describe("verifier-router", () => { const estopProofInstruction = getEmergencyStopWithProofInstruction({ authority: notOwner, bpfLoaderUpgradableProgram: SOLANA_LOADER_V3_PROGRAM_PROGRAM_ADDRESS, - imageId: emptyImageId, - journalDigest: emptyJournalDigest, proof: emptyProof, router: routerAddress, selector: TEST_BAD_SELECTOR, From 7e6d61a809cf5f5cc28beb4688d59d566cf9d771 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Fri, 27 Dec 2024 06:03:49 -0700 Subject: [PATCH 13/21] Remove section from Readme that was left in by mistake --- solana-verifier/README.md | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/solana-verifier/README.md b/solana-verifier/README.md index 0f2e884..c13fed2 100644 --- a/solana-verifier/README.md +++ b/solana-verifier/README.md @@ -146,37 +146,6 @@ VERIFIER_ADDRESS=
yarn run add yarn run estop # Follow prompts ``` -### Emergency Stop Mechanisms - -#### Owner-Triggered Stop -```bash -yarn run estop -# Enter selector when prompted -# Confirm with "YES CALL EMERGENCY STOP" -``` - -#### Proof-Based Stop -Submit a proof demonstrating exploitation to trigger automatic shutdown: -```rust -verifier_router::cpi::emergency_stop_with_proof( - context, - selector, - exploitation_proof -) -``` - -## Security Considerations - -1. **Proof Verification**: - - Always validate journal digests - - Check image IDs match expected values - - Verify that journal outputs are valid for your use case - -2. **Account Validation**: - - Verify PDA derivations - - Check verifier program addresses - - Validate selectors and authorities - ## Development Tools ### Scripts From cee308cd5257311d2f0cf085041de57b3ff855a3 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sat, 28 Dec 2024 04:03:51 -0700 Subject: [PATCH 14/21] Added using borsh in the example program for more complex data use cases --- solana-examples/Anchor.toml | 2 +- solana-examples/Cargo.lock | 8 + solana-examples/Cargo.toml | 3 +- solana-examples/hello-world/host/Cargo.toml | 3 +- solana-examples/hello-world/host/src/main.rs | 45 ++- .../hello-world/methods/guest/Cargo.toml | 2 + .../hello-world/methods/guest/src/main.rs | 14 +- .../programs/solana-examples/Cargo.toml | 1 + .../programs/solana-examples/src/lib.rs | 35 +- solana-examples/shared/Cargo.toml | 7 + solana-examples/shared/src/lib.rs | 32 ++ solana-verifier/Anchor.toml | 12 +- .../programs/groth_16_verifier/src/lib.rs | 2 +- .../programs/test_bad_verifier/src/lib.rs | 2 +- .../programs/verifier_router/src/lib.rs | 2 +- .../bad-verifier/programs/testBadVerifier.ts | 4 +- .../groth16/programs/groth16Verifier.ts | 4 +- .../scripts/utils/fireblocksSigner.ts | 2 +- solana-verifier/scripts/utils/utils.ts | 13 +- .../verify-router/programs/verifierRouter.ts | 4 +- solana-verifier/yarn.lock | 332 ++++++++---------- 21 files changed, 295 insertions(+), 234 deletions(-) create mode 100644 solana-examples/shared/Cargo.toml create mode 100644 solana-examples/shared/src/lib.rs diff --git a/solana-examples/Anchor.toml b/solana-examples/Anchor.toml index 2fc74c1..8369991 100644 --- a/solana-examples/Anchor.toml +++ b/solana-examples/Anchor.toml @@ -5,7 +5,7 @@ resolution = true skip-lint = false [programs.localnet] -solana_examples = "C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo" +solana_examples = "AtDe6MQUn7LyiYbHFYe2AyugciHfWnyozstekf7wMFMq" [registry] url = "https://api.apr.dev" diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock index 6a916af..da20000 100644 --- a/solana-examples/Cargo.lock +++ b/solana-examples/Cargo.lock @@ -1882,6 +1882,13 @@ dependencies = [ "keccak", ] +[[package]] +name = "shared" +version = "0.1.0" +dependencies = [ + "borsh 0.10.4", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2006,6 +2013,7 @@ version = "0.1.0" dependencies = [ "anchor-lang", "methods", + "shared", "verifier_router", ] diff --git a/solana-examples/Cargo.toml b/solana-examples/Cargo.toml index f397704..b5b301f 100644 --- a/solana-examples/Cargo.toml +++ b/solana-examples/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ - "programs/*" + "programs/*", + "shared" ] resolver = "2" diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml index e6119fa..0cb6489 100644 --- a/solana-examples/hello-world/host/Cargo.toml +++ b/solana-examples/hello-world/host/Cargo.toml @@ -16,7 +16,8 @@ serde_json = "1.0.133" solana-program = "2.1.6" tokio = { version = "1.42.0", features = ["macros"] } tracing = "0.1.41" - +borsh = { version = "0.10.3" } +shared = { path = "../../shared" } # Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 [patch.crates-io] diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index 76e6f9d..6f2bbbf 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -11,13 +11,16 @@ use anchor_client::{ solana_sdk::{signature::Keypair, signer::Signer}, Client, Cluster, }; +use borsh::to_vec; use groth_16_verifier::client::receipt_to_proof; use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; +use risc0_zkvm::sha::Digestible; use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts}; +use solana_examples::{accounts, instruction, ProgramData}; use std::sync::Arc; use tracing::{debug, info, trace}; - -use solana_examples::{accounts, instruction, ProgramData}; +// A shared library that contains the inputs / outputs of our guest +use shared::IncrementNonceArguments; type PROGRAM = Program>; @@ -52,7 +55,11 @@ async fn init(user: Arc, example_program: &PROGRAM, program_data_addres info!("Transaction Successful, our program is initialized and now ready for verifying proofs"); } -async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) { +async fn increment_nonce( + user: Arc, + example_program: PROGRAM, + program_data_address: Pubkey, +) { info!("Attempting to increment program nonce"); let program_data: ProgramData = example_program @@ -64,17 +71,17 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) info!("Current Nonce value is {nonce}"); - // Increment the current nonce for our transaction to be accepted - let input: u32 = nonce + 1; - - info!("Constructing proof to increment nonce value to {input}"); let prover = default_prover(); - let env = ExecutorEnv::builder() - .write(&input) - .unwrap() - .build() - .unwrap(); + let nonce_arguments = IncrementNonceArguments { + account: user.pubkey().to_bytes(), + nonce, + }; + + // We serialize with Borsh to get a format that is more commonly used in Solana + let input = to_vec(&nonce_arguments).expect("Could not serialize proof nonce arguments"); + + let env = ExecutorEnv::builder().write_slice(&input).build().unwrap(); // Proof information by proving the specified ELF binary. // This struct contains the receipt along with statistics about execution of the guest @@ -85,6 +92,10 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) let receipt = prove_info.receipt; + let journal_digest = receipt.journal.digest(); + + debug!("Journal digest is {journal_digest:?}"); + info!("Groth 16 proof for nonce increment transaction successfully created, submitting transaction to the program."); let groth16_receipt = receipt @@ -104,6 +115,8 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) &verifier_router::ID, ); + let output = receipt.journal.bytes; + debug!("Using the address: {verifier_entry_address} as the Verifier Entry Account"); example_program @@ -112,14 +125,16 @@ async fn increment_nonce(example_program: PROGRAM, program_data_address: Pubkey) program_data: program_data_address, router: verifier_router::ID, router_account: router_pda_address, + prover: user.pubkey(), verifier_entry: verifier_entry_address, system_program: SYSTEM_PROGRAM_ID, verifier_program: groth_16_verifier::ID, }) .args(instruction::IncrementNonce { - journal_nonce: input, + journal_outputs: output, proof: proof, }) + .signer(&user) .send() .await .expect("Unable to send increment nonce transaction"); @@ -195,7 +210,7 @@ async fn main() { if program_data.is_err() { info!("Could not find program data account, could be first run, initializing program!"); - init(user, &example_program, program_data_address).await; + init(user.clone(), &example_program, program_data_address).await; } - increment_nonce(example_program, program_data_address).await + increment_nonce(user, example_program, program_data_address).await } diff --git a/solana-examples/hello-world/methods/guest/Cargo.toml b/solana-examples/hello-world/methods/guest/Cargo.toml index 3fa3eb6..a032d7e 100644 --- a/solana-examples/hello-world/methods/guest/Cargo.toml +++ b/solana-examples/hello-world/methods/guest/Cargo.toml @@ -7,3 +7,5 @@ edition = "2021" [dependencies] risc0-zkvm = { version = "1.2.0", default-features = false, features = ['std'] } +borsh = { version = "0.10.3" } +shared = { path = "../../../shared" } \ No newline at end of file diff --git a/solana-examples/hello-world/methods/guest/src/main.rs b/solana-examples/hello-world/methods/guest/src/main.rs index 14b597f..0676cec 100644 --- a/solana-examples/hello-world/methods/guest/src/main.rs +++ b/solana-examples/hello-world/methods/guest/src/main.rs @@ -1,9 +1,15 @@ +use borsh::{BorshDeserialize, BorshSerialize}; use risc0_zkvm::guest::env; +use shared::IncrementNonceArguments; fn main() { - // read the input - let input: u32 = env::read(); + // read the input, we use the stdin reader since we are using borsh (more common on solana) then Serde which is built into + // the env::read option + let mut inputs = IncrementNonceArguments::deserialize_reader(&mut env::stdin()).unwrap(); - // write public output to the journal - env::commit(&input); + // Increment the nonce + inputs.nonce = inputs.nonce + 1; + + // Our proof very simply deserializes then re-serializes the value + inputs.serialize(&mut env::journal()).unwrap(); } diff --git a/solana-examples/programs/solana-examples/Cargo.toml b/solana-examples/programs/solana-examples/Cargo.toml index dc7090a..e33ecd6 100644 --- a/solana-examples/programs/solana-examples/Cargo.toml +++ b/solana-examples/programs/solana-examples/Cargo.toml @@ -25,3 +25,4 @@ curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = " anchor-lang = "0.30.1" verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["cpi"] } methods = { path = "../../hello-world/methods"} +shared = { path = "../../shared" } diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index c17bbe7..5b521ab 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -1,10 +1,13 @@ use anchor_lang::prelude::*; +use anchor_lang::AnchorDeserialize; +use borsh::BorshDeserialize; +use shared::IncrementNonceArguments; use verifier_router::cpi::accounts::Verify; use verifier_router::program::VerifierRouter as VerifierRouterProgram; use verifier_router::router::Proof; use verifier_router::state::{VerifierEntry, VerifierRouter}; -declare_id!("C1adB16jZGJHfhGFHQCMaWsjwZR5BGZUqKyxd79aiZSo"); +declare_id!("AtDe6MQUn7LyiYbHFYe2AyugciHfWnyozstekf7wMFMq"); #[program] pub mod solana_examples { @@ -28,21 +31,34 @@ pub mod solana_examples { /// it takes a proof that someone has run our off chain program for the next nonce value. /// If the input they gave the off chain program was for an earlier or later nonce, /// the on chain program rejects the transaction. If it the proof is for incrementing to - /// the next nonce it accepts the transaction. + /// the next nonce and it was generated by a user who control the pubkey of the proof + /// it accepts the transaction. pub fn increment_nonce( ctx: Context, proof: Proof, - journal_nonce: u32, + journal_outputs: Vec, ) -> Result<()> { - // Since our program only has a single output of a u32 value in the journal we can just accept what the data is - // and confirm it by creating a digest. Our first step is checking the conditions of the journal outputs match + // We use Borsh to deserialize the data from the journal + let journal_data: IncrementNonceArguments = + BorshDeserialize::try_from_slice(&journal_outputs)?; + + // Next we want to check the conditions of the journal outputs match // whatever our programs needs to accept the transaction. In this case we verify that the proof generated is // of a nonce value one greater then the current one. require!( - journal_nonce == ctx.accounts.program_data.nonce + 1, + journal_data.nonce == ctx.accounts.program_data.nonce + 1, ExampleErrors::InvalidNonce ); + // We will also check that the account address of the nonce account matches the address signing the transaction + require!( + journal_data.account == ctx.accounts.prover.key().as_ref(), + ExampleErrors::InvalidPubkey + ); + + // We hash our journal outputs to get a journal digest + let journal_digest = hashv(&[journal_outputs.as_slice()]).to_bytes(); + // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program let cpi_accounts = Verify { router: ctx.accounts.router_account.to_account_info(), @@ -51,9 +67,6 @@ pub mod solana_examples { system_program: ctx.accounts.system_program.to_account_info(), }; - // We hash our journal outputs that we used for our earlier requirements to get a journal digest - let journal_digest = hashv(&[&journal_nonce.to_le_bytes()]).to_bytes(); - // We collect the image ID that our program is expecting our proof to match so that an attacker cannot use // a proof generated from a modified program let image_id = ctx.accounts.program_data.image_id; @@ -125,6 +138,8 @@ pub struct IncrementNonce<'info> { )] pub verifier_entry: Account<'info, VerifierEntry>, + pub prover: Signer<'info>, + /// The actual Groth16 verifier program that will verify the proof /// CHECK: The verifier program checks are handled by the router program pub verifier_program: UncheckedAccount<'info>, @@ -138,6 +153,8 @@ pub enum ExampleErrors { InvalidVerifier, #[msg("Nonce is invalid for current transaction")] InvalidNonce, + #[msg("Account pubkey from proof does not match pubkey of current journal output")] + InvalidPubkey, } /// The event emitted when a user submits a valid transaction diff --git a/solana-examples/shared/Cargo.toml b/solana-examples/shared/Cargo.toml new file mode 100644 index 0000000..16b9245 --- /dev/null +++ b/solana-examples/shared/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "shared" +version = "0.1.0" +edition = "2021" + +[dependencies] +borsh = { version = "0.10.3" } \ No newline at end of file diff --git a/solana-examples/shared/src/lib.rs b/solana-examples/shared/src/lib.rs new file mode 100644 index 0000000..3b35eb4 --- /dev/null +++ b/solana-examples/shared/src/lib.rs @@ -0,0 +1,32 @@ +use borsh::{BorshDeserialize, BorshSerialize}; + +// This is where we define data that will be shared between our +// host program, our guest program, and our Solana on chain program. +#[derive(Debug, BorshSerialize, BorshDeserialize, Clone, Hash)] +pub struct IncrementNonceArguments { + pub account: [u8; 32], + pub nonce: u32, +} + +#[cfg(test)] +mod tests { + // Note this useful idiom: importing names from outer (for mod tests) scope. + use super::*; + + #[test] + fn serialize_deserialize() { + let nonce_arguments = IncrementNonceArguments { + account: [0xCA; 32], + nonce: 16, + }; + println!("Current data as nonce_arguments: {nonce_arguments:#?}"); + let mut buffer = Vec::new(); + nonce_arguments.serialize(&mut buffer).unwrap(); + println!("Current buffer is {buffer:#?}"); + // Attempt to parse it out + let journal_data: IncrementNonceArguments = + BorshDeserialize::try_from_slice(&buffer).unwrap(); + + println!("Current data in journal_data is: {journal_data:#?}"); + } +} diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml index 8af0fc7..5d82627 100644 --- a/solana-verifier/Anchor.toml +++ b/solana-verifier/Anchor.toml @@ -5,9 +5,9 @@ resolution = true skip-lint = false [programs.localnet] -groth_16_verifier = "Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa" -test_bad_verifier = "AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r" -verifier_router = "DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa" +groth_16_verifier = "GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1" +test_bad_verifier = "2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP" +verifier_router = "6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM" [registry] url = "https://api.apr.dev" @@ -17,14 +17,14 @@ cluster = "Localnet" wallet = "~/.config/solana/id.json" [scripts] +accept = "yarn run ts-node scripts/acceptOwnership.ts" +add = "yarn run ts-node scripts/addVerifier.ts" client = "yarn run ts-node scripts/codma.ts" deploy = "yarn run ts-node scripts/deploy.ts" estop = "yarn run ts-node scripts/estop.ts" renounce = "yarn run ts-node scripts/renounceOwnership.ts" -transfer = "yarn run ts-node scripts/transferOwnership.ts" -add = "yarn run ts-node scripts/addVerifier.ts" -accept = "yarn run ts-node scripts/acceptOwnership.ts" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" +transfer = "yarn run ts-node scripts/transferOwnership.ts" [test] startup_wait = 5000 diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index e92d681..132e9b8 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -12,7 +12,7 @@ mod vk; pub use vk::{VerificationKey, VERIFICATION_KEY}; -declare_id!("Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa"); +declare_id!("GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1"); const ALLOWED_CONTROL_ROOT: &str = "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs index e05cc92..55dc53f 100644 --- a/solana-verifier/programs/test_bad_verifier/src/lib.rs +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -2,7 +2,7 @@ use anchor_lang::prelude::*; use anchor_lang::system_program; use groth_16_verifier::Proof; -declare_id!("AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r"); +declare_id!("2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP"); #[error_code] pub enum VerifierError { diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 4ab960a..3cf97b5 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -10,7 +10,7 @@ use estop::*; use router::*; use state::*; -declare_id!("DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa"); +declare_id!("6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM"); /// Verifier Router Program for Anchor /// diff --git a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts index e7f72dd..9591b49 100644 --- a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts +++ b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const TEST_BAD_VERIFIER_PROGRAM_ADDRESS = - 'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r' as Address<'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r'>; + '2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP' as Address<'2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP'>; export enum TestBadVerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyTestBadVerifierInstruction( } export type ParsedTestBadVerifierInstruction< - TProgram extends string = 'AdneDeXEyPk72VfLQMrQBTjuQj2fuBXm9efJdcB7eE3r', + TProgram extends string = '2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP', > = { instructionType: TestBadVerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts index 1329e8b..1135711 100644 --- a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts +++ b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const GROTH16_VERIFIER_PROGRAM_ADDRESS = - 'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa' as Address<'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa'>; + 'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1' as Address<'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1'>; export enum Groth16VerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyGroth16VerifierInstruction( } export type ParsedGroth16VerifierInstruction< - TProgram extends string = 'Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa', + TProgram extends string = 'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1', > = { instructionType: Groth16VerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/utils/fireblocksSigner.ts b/solana-verifier/scripts/utils/fireblocksSigner.ts index 670e8a1..70f8be3 100644 --- a/solana-verifier/scripts/utils/fireblocksSigner.ts +++ b/solana-verifier/scripts/utils/fireblocksSigner.ts @@ -235,7 +235,7 @@ export async function createSignerFromFireblocksConfig( * - FIREBLOCKS_ASSET_ID (defaults to "SOL_TEST") */ export async function getFireblocksSigner(): Promise { - if (!usingFireblocks()) { + if (!(await usingFireblocks())) { return null; } logger.info("Something is using the fireblocks signer"); diff --git a/solana-verifier/scripts/utils/utils.ts b/solana-verifier/scripts/utils/utils.ts index 875f188..0722495 100644 --- a/solana-verifier/scripts/utils/utils.ts +++ b/solana-verifier/scripts/utils/utils.ts @@ -388,7 +388,7 @@ export async function getLocalKeypair(): Promise> { * @returns TransactionSigner to use for signing */ export async function getTransactionSigner(): Promise { - if (usingFireblocks()) { + if (await usingFireblocks()) { const signer = await getFireblocksSigner(); if (signer !== null) { return signer; @@ -518,8 +518,8 @@ export function loadMinimumScriptBalance(): Lamports { * * @returns true if Fireblocks credentials are configured */ -export function usingFireblocks(): boolean { - return getFireblocksCredentials() !== null; +export async function usingFireblocks(): Promise { + return (await getFireblocksCredentials()) !== null; } /** @@ -534,9 +534,14 @@ export function usingFireblocks(): boolean { export async function getFireblocksCredentials(): Promise { const apiSecretPath = process.env.FIREBLOCKS_PRIVATE_KEY_PATH; const apiKey = process.env.FIREBLOCKS_API_KEY; - const basePath_env = process.env.FIREBLOCKS_BASE_PATH; + const basePath_env = process.env.FIREBLOCKS_BASE_PATH || ""; const assetId = process.env.FIREBLOCKS_ASSET_ID || "SOL_TEST"; const vaultAccountId = process.env.FIREBLOCKS_VAULT; + // If at least one of the fireblocks credential values are set + // AND one or more of the required values is not set + if (!apiSecretPath && !apiKey && !vaultAccountId) { + return null; + } const basePath = parseBasePath(basePath_env); if (!apiSecretPath || !apiKey || !vaultAccountId) { logger.warn("FIREBLOCKS VARIABLES USED BUT NOT ALL WHERE INCLUDED:"); diff --git a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts index 35781ba..055622b 100644 --- a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts +++ b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts @@ -26,7 +26,7 @@ import { } from '../instructions'; export const VERIFIER_ROUTER_PROGRAM_ADDRESS = - 'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa' as Address<'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa'>; + '6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM' as Address<'6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM'>; export enum VerifierRouterAccount { VerifierEntry, @@ -185,7 +185,7 @@ export function identifyVerifierRouterInstruction( } export type ParsedVerifierRouterInstruction< - TProgram extends string = 'DNzgxRPwrWW7ZVTVWr5zhhHAJMjzs3B17eVpZVJfvzHa', + TProgram extends string = '6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM', > = | ({ instructionType: VerifierRouterInstruction.AcceptOwnership; diff --git a/solana-verifier/yarn.lock b/solana-verifier/yarn.lock index d213d2f..d8b92f5 100644 --- a/solana-verifier/yarn.lock +++ b/solana-verifier/yarn.lock @@ -23,7 +23,7 @@ resolved "https://registry.npmjs.org/@codama/node-types/-/node-types-1.1.0.tgz" integrity sha512-+J6E0didCY0+8dr2vI6ag+FMaMr3SemvXJYKOhxKEJ6HXR/J+7cddpptXyrIhLa8R2Kw0yzIG9VjAlUGL7u8OQ== -"@codama/nodes-from-anchor@^1.0.1", "@codama/nodes-from-anchor@1.0.1": +"@codama/nodes-from-anchor@1.0.1", "@codama/nodes-from-anchor@^1.0.1": version "1.0.1" resolved "https://registry.npmjs.org/@codama/nodes-from-anchor/-/nodes-from-anchor-1.0.1.tgz" integrity sha512-9sITAJyWxjbuBqeSmiA/AzN15+65KvycPJmc0ReWWsbqBCblr0A5jeA/zFbfILRFcu6MVyJXpQvl42FZ/vAL1g== @@ -203,7 +203,7 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@^9.17.0", "@eslint/js@9.17.0": +"@eslint/js@9.17.0", "@eslint/js@^9.17.0": version "9.17.0" resolved "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz" integrity sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w== @@ -287,7 +287,7 @@ dependencies: "@noble/hashes" "1.6.0" -"@noble/hashes@^1.3.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@1.6.0": +"@noble/hashes@1.6.0", "@noble/hashes@^1.3.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0": version "1.6.0" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz" integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== @@ -300,7 +300,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -387,13 +387,6 @@ dependencies: buffer "~6.0.3" -"@solana/codecs-core@2.0.0-rc.1": - version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz" - integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== - dependencies: - "@solana/errors" "2.0.0-rc.1" - "@solana/codecs-core@2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0.tgz" @@ -401,13 +394,11 @@ dependencies: "@solana/errors" "2.0.0" -"@solana/codecs-data-structures@2.0.0-rc.1": +"@solana/codecs-core@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz" - integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== + resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz" + integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== dependencies: - "@solana/codecs-core" "2.0.0-rc.1" - "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" "@solana/codecs-data-structures@2.0.0": @@ -419,12 +410,13 @@ "@solana/codecs-numbers" "2.0.0" "@solana/errors" "2.0.0" -"@solana/codecs-numbers@2.0.0-rc.1": +"@solana/codecs-data-structures@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz" - integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== + resolved "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz" + integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== dependencies: "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" "@solana/codecs-numbers@2.0.0": @@ -435,13 +427,12 @@ "@solana/codecs-core" "2.0.0" "@solana/errors" "2.0.0" -"@solana/codecs-strings@2.0.0-rc.1": +"@solana/codecs-numbers@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz" - integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== + resolved "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz" + integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== dependencies: "@solana/codecs-core" "2.0.0-rc.1" - "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" "@solana/codecs-strings@2.0.0", "@solana/codecs-strings@rc": @@ -453,16 +444,14 @@ "@solana/codecs-numbers" "2.0.0" "@solana/errors" "2.0.0" -"@solana/codecs@2.0.0-rc.1": +"@solana/codecs-strings@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz" - integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== + resolved "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz" + integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== dependencies: "@solana/codecs-core" "2.0.0-rc.1" - "@solana/codecs-data-structures" "2.0.0-rc.1" "@solana/codecs-numbers" "2.0.0-rc.1" - "@solana/codecs-strings" "2.0.0-rc.1" - "@solana/options" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" "@solana/codecs@2.0.0": version "2.0.0" @@ -475,13 +464,16 @@ "@solana/codecs-strings" "2.0.0" "@solana/options" "2.0.0" -"@solana/errors@2.0.0-rc.1": +"@solana/codecs@2.0.0-rc.1": version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz" - integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== + resolved "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz" + integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== dependencies: - chalk "^5.3.0" - commander "^12.1.0" + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/options" "2.0.0-rc.1" "@solana/errors@2.0.0": version "2.0.0" @@ -491,6 +483,14 @@ chalk "^5.3.0" commander "^12.1.0" +"@solana/errors@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz" + integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + "@solana/fast-stable-stringify@2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0.tgz" @@ -518,17 +518,6 @@ "@solana/codecs-strings" "2.0.0" "@solana/errors" "2.0.0" -"@solana/options@2.0.0-rc.1": - version "2.0.0-rc.1" - resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz" - integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== - dependencies: - "@solana/codecs-core" "2.0.0-rc.1" - "@solana/codecs-data-structures" "2.0.0-rc.1" - "@solana/codecs-numbers" "2.0.0-rc.1" - "@solana/codecs-strings" "2.0.0-rc.1" - "@solana/errors" "2.0.0-rc.1" - "@solana/options@2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0.tgz" @@ -540,6 +529,17 @@ "@solana/codecs-strings" "2.0.0" "@solana/errors" "2.0.0" +"@solana/options@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz" + integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + "@solana/programs@2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@solana/programs/-/programs-2.0.0.tgz" @@ -786,49 +786,7 @@ "@solana/rpc-types" "2.0.0" "@solana/transaction-messages" "2.0.0" -"@solana/web3.js@^1.32.0": - version "1.98.0" - resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" - integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== - dependencies: - "@babel/runtime" "^7.25.0" - "@noble/curves" "^1.4.2" - "@noble/hashes" "^1.4.0" - "@solana/buffer-layout" "^4.0.1" - agentkeepalive "^4.5.0" - bigint-buffer "^1.1.5" - bn.js "^5.2.1" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.3" - fast-stable-stringify "^1.0.0" - jayson "^4.1.1" - node-fetch "^2.7.0" - rpc-websockets "^9.0.2" - superstruct "^2.0.2" - -"@solana/web3.js@^1.68.0": - version "1.98.0" - resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" - integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== - dependencies: - "@babel/runtime" "^7.25.0" - "@noble/curves" "^1.4.2" - "@noble/hashes" "^1.4.0" - "@solana/buffer-layout" "^4.0.1" - agentkeepalive "^4.5.0" - bigint-buffer "^1.1.5" - bn.js "^5.2.1" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.3" - fast-stable-stringify "^1.0.0" - jayson "^4.1.1" - node-fetch "^2.7.0" - rpc-websockets "^9.0.2" - superstruct "^2.0.2" - -"@solana/web3.js@^1.95.3": +"@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0": version "1.98.0" resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== @@ -1005,7 +963,7 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", "@typescript-eslint/eslint-plugin@^8.18.2", "@typescript-eslint/eslint-plugin@8.18.2": +"@typescript-eslint/eslint-plugin@8.18.2", "@typescript-eslint/eslint-plugin@^8.18.2": version "8.18.2" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz" integrity sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg== @@ -1020,7 +978,7 @@ natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^8.0.0 || ^8.0.0-alpha.0", "@typescript-eslint/parser@^8.18.2", "@typescript-eslint/parser@8.18.2": +"@typescript-eslint/parser@8.18.2", "@typescript-eslint/parser@^8.18.2": version "8.18.2" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz" integrity sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA== @@ -1091,6 +1049,14 @@ resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + a-sync-waterfall@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz" @@ -1101,7 +1067,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.14.0: +acorn@^8.14.0: version "8.14.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== @@ -1288,13 +1254,6 @@ browser-stdout@1.3.1: resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -bs58@^4.0.0, bs58@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - bs58@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz" @@ -1302,6 +1261,13 @@ bs58@5.0.0: dependencies: base-x "^4.0.0" +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" @@ -1317,7 +1283,7 @@ buffer-layout@^1.2.0, buffer-layout@^1.2.2: resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== -buffer@^6.0.3, buffer@~6.0.3, buffer@6.0.3: +buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1380,7 +1346,7 @@ chai-as-promised@^7.1.2: dependencies: check-error "^1.0.2" -chai@^4.3.4, "chai@>= 2.1.2 < 6": +chai@^4.3.4: version "4.5.0" resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== @@ -1413,7 +1379,7 @@ check-error@^1.0.2, check-error@^1.0.3: dependencies: get-func-name "^2.0.2" -chokidar@^3.3.0, chokidar@3.5.3: +chokidar@3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -1512,7 +1478,7 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -debug@^4.3.1, debug@^4.3.2, debug@4.3.3: +debug@4.3.3, debug@^4.3.1, debug@^4.3.2: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -1600,16 +1566,16 @@ did-resolver@^4.1.0: resolved "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz" integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA== -diff@^3.1.0: - version "3.5.0" - resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - diff@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + dot-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" @@ -1678,7 +1644,7 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@^4.0.0, escape-string-regexp@4.0.0: +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== @@ -1715,7 +1681,7 @@ eslint-visitor-keys@^4.2.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^8.57.0 || ^9.0.0", "eslint@^9.0.0 || ^8.0.0", eslint@^9.17.0, eslint@>=0.8.0: +eslint@^9.17.0: version "9.17.0" resolved "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz" integrity sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA== @@ -1834,11 +1800,6 @@ fast-stable-stringify@^1.0.0: resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== -fastestsmallesttextencoderdecoder@^1.0.22: - version "1.0.22" - resolved "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz" - integrity sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw== - fastq@^1.6.0: version "1.18.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz" @@ -1878,7 +1839,7 @@ filter-obj@^1.1.0: resolved "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -find-up@^5.0.0, find-up@5.0.0: +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -1943,6 +1904,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -2166,17 +2132,17 @@ jayson@^4.1.1: "@types/connect" "^3.4.33" "@types/node" "^12.12.54" "@types/ws" "^7.4.4" + JSONStream "^1.3.5" commander "^2.20.3" delay "^5.0.0" es6-promisify "^5.0.0" eyes "^0.1.8" isomorphic-ws "^4.0.1" json-stringify-safe "^5.0.1" - JSONStream "^1.3.5" uuid "^8.3.2" ws "^7.5.10" -js-yaml@^4.1.0, js-yaml@4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -2231,18 +2197,10 @@ jsonparse@^1.2.0: resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -JSONStream@^1.3.5: - version "1.3.5" - resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -jsonwebtoken@^9.0.2: - version "9.0.2" - resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz" - integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== +jsonwebtoken@8.5.1: + version "8.5.1" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== dependencies: jws "^3.2.2" lodash.includes "^4.3.0" @@ -2253,12 +2211,12 @@ jsonwebtoken@^9.0.2: lodash.isstring "^4.0.1" lodash.once "^4.0.0" ms "^2.1.1" - semver "^7.5.4" + semver "^5.6.0" -jsonwebtoken@8.5.1: - version "8.5.1" - resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== +jsonwebtoken@^9.0.2: + version "9.0.2" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== dependencies: jws "^3.2.2" lodash.includes "^4.3.0" @@ -2269,7 +2227,7 @@ jsonwebtoken@8.5.1: lodash.isstring "^4.0.1" lodash.once "^4.0.0" ms "^2.1.1" - semver "^5.6.0" + semver "^7.5.4" jwa@^1.4.1: version "1.4.1" @@ -2422,14 +2380,14 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" -minimatch@^3.0.4: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== dependencies: brace-expansion "^1.1.7" -minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -2443,13 +2401,6 @@ minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== - dependencies: - brace-expansion "^1.1.7" - minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -2462,7 +2413,7 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" -"mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", mocha@^9.0.3: +mocha@^9.0.3: version "9.2.2" resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== @@ -2492,17 +2443,17 @@ mkdirp@^0.5.1: yargs-parser "20.2.4" yargs-unparser "2.0.0" -ms@^2.0.0, ms@^2.1.1, ms@^2.1.3, ms@2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -multibase@^4.0.6, multibase@4.0.6: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@4.0.6, multibase@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz" integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ== @@ -2660,7 +2611,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -platform@^1.3.6, platform@1.3.6: +platform@1.3.6, platform@^1.3.6: version "1.3.6" resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== @@ -2858,11 +2809,20 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -"solana_fireblocks_web3_provider@https://github.com/fireblocks/solana-web3-adapter.git": - version "1.0.0" - resolved "git+ssh://git@github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd" - dependencies: - "@solana/spl-token" "^0.4.6" +solana-bankrun-darwin-arm64@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-arm64/-/solana-bankrun-darwin-arm64-0.4.0.tgz#eb0f3dfffb1675f6329a1e026b12d09222b33986" + integrity sha512-6dz78Teoz7ez/3lpRLDjktYLJb79FcmJk2me4/YaB8WiO6W43OdExU4h+d2FyuAryO2DgBPXaBoBNY/8J1HJmw== + +solana-bankrun-darwin-universal@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-universal/-/solana-bankrun-darwin-universal-0.4.0.tgz#0ac13ec7637b334b1030e6f51abecc50a254b5de" + integrity sha512-zSSw/Jx3KNU42pPMmrEWABd0nOwGJfsj7nm9chVZ3ae7WQg3Uty0hHAkn5NSDCj3OOiN0py9Dr1l9vmRJpOOxg== + +solana-bankrun-darwin-x64@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/solana-bankrun-darwin-x64/-/solana-bankrun-darwin-x64-0.4.0.tgz#f863c5a668858b7c44be51376bd05fb077c11c99" + integrity sha512-LWjs5fsgHFtyr7YdJR6r0Ho5zrtzI6CY4wvwPXr8H2m3b4pZe6RLIZjQtabCav4cguc14G0K8yQB2PTMuGub8w== solana-bankrun-linux-x64-gnu@0.4.0: version "0.4.0" @@ -2888,6 +2848,12 @@ solana-bankrun@^0.4.0: solana-bankrun-linux-x64-gnu "0.4.0" solana-bankrun-linux-x64-musl "0.4.0" +"solana_fireblocks_web3_provider@https://github.com/fireblocks/solana-web3-adapter.git": + version "1.0.0" + resolved "git+ssh://git@github.com/fireblocks/solana-web3-adapter.git#95403b6ad3893d6a5a3fb474c80fbb20684d47dd" + dependencies: + "@solana/spl-token" "^0.4.6" + sort-any@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/sort-any/-/sort-any-2.0.0.tgz" @@ -2939,7 +2905,7 @@ strip-bom@^3.0.0: resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@^3.1.1, strip-json-comments@3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -2954,13 +2920,6 @@ superstruct@^2.0.2: resolved "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz" integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - supports-color@8.1.1: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" @@ -2968,6 +2927,13 @@ supports-color@8.1.1: dependencies: has-flag "^4.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" @@ -3069,12 +3035,12 @@ typescript-eslint@^8.18.2: "@typescript-eslint/parser" "8.18.2" "@typescript-eslint/utils" "8.18.2" -typescript@^5.7.2, typescript@>=4.2.0, "typescript@>=4.8.4 <5.8.0", typescript@>=5: +typescript@^5.7.2: version "5.7.2" resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz" integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== -uint8arrays@^3.0.0, uint8arrays@3.1.1: +uint8arrays@3.1.1, uint8arrays@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== @@ -3098,14 +3064,14 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -utf-8-validate@^5.0.2, utf-8-validate@>=5.0.2: +utf-8-validate@^5.0.2: version "5.0.10" resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== dependencies: node-gyp-build "^4.3.0" -uuid@^8.3.2, uuid@8.3.2: +uuid@8.3.2, uuid@^8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -3138,7 +3104,7 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@^2.0.1, which@2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -3169,31 +3135,31 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@*, ws@^8.18.0, ws@^8.5.0: - version "8.18.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - ws@^7.5.10: version "7.5.10" resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" From 5356359cc4bdb7e49ced0c53b82c1fdec0c7e5df Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sat, 28 Dec 2024 05:26:26 -0700 Subject: [PATCH 15/21] Finished up the readmes and cleaned up some comments --- solana-examples/README | 166 +++++++++++++++++++ solana-examples/hello-world/README.md | 111 ------------- solana-examples/hello-world/host/src/main.rs | 81 ++++++++- solana-examples/shared/src/lib.rs | 25 +-- solana-examples/tests/solana-examples.ts | 16 -- solana-ownable/ownable/README | 163 ++++++++++++++++++ 6 files changed, 411 insertions(+), 151 deletions(-) create mode 100644 solana-examples/README delete mode 100644 solana-examples/hello-world/README.md delete mode 100644 solana-examples/tests/solana-examples.ts create mode 100644 solana-ownable/ownable/README diff --git a/solana-examples/README b/solana-examples/README new file mode 100644 index 0000000..67e515e --- /dev/null +++ b/solana-examples/README @@ -0,0 +1,166 @@ +# Solana Zero-Knowledge Proof Example Project + +This project demonstrates how to use the Risc0 zero-knowledge prover with Solana. +It provides an example Solana program that implements a simple nonce increment system + where users must provide valid ZK proofs to increment a nonce value on-chain. + +## Project Structure + +The project consists of several key components: + +- **Solana Programs**: Smart contracts that handle on-chain verification and state management + - `verifier_router`: Routes proof verification requests to appropriate verifiers + - `groth16_verifier`: The Risc0 Groth16 verifier that performs the proof verification + - `solana-examples`: Example program that uses the data from a Risc0 Proof + +- **RISC Zero Guest Program**: Off-chain program that generates proofs + - Located in `hello-world/methods/guest` + - Implements nonce increment logic that will be proven + +- **Host Program**: Rust program that acts as the Solana client and submits data for proving + - Located in `hello-world/host` + - Initializes the Solana example program account on first run + - Handles proof generation and submission to Solana + +## Prerequisites + +- Rust and Cargo +- Solana Tools +- Anchor Framework +- Node.js and Yarn + +## Setup and Installation + +1. Configure Local Environment: +```bash +# Configure Solana for localhost +solana config set --url localhost + +# Generate a new keypair if needed +solana-keygen new +``` + +2. Start Local Validator: +```bash +# Run this in a separate terminal +solana-test-validator -r +``` + +3. Build and Deploy the Verifier Router System: +```bash +# Go to the Solana Verifier programs to deploy them locally +cd solana-verifier + +# Install the dependencies for the scripts +yarn install + +# Sync keys for local deploy +anchor keys sync + +# Generate client code for scripts before first run +yarn run client + +# Deploy the programs locally +yarn run deploy +``` + +4. Build and Deploy the Example Project: +```bash +# Go to the Solana Examples directory for everything else +cd solana-examples + +# Sync keys for local deploy +anchor keys sync + +# Deploy the program locally +anchor deploy +``` + +## Running the Example + +```bash +# Go to the Client program directory +cd hello-world + +# Run the example program +RUST_LOG=info cargo run +``` + +This will: +- Generate a fresh keypair and request an airdrop (to demonstrate anyone can submit proofs) +- Initialize the Solana example program on the first run +- Generate a ZK proof for incrementing the nonce +- Submit the proof to the Solana program +- Verify the proof on-chain +- Update the nonce if verification succeeds + +## Understanding the Flow + +1. **Initialization** + - The Solana program initializes with a starting nonce of 0 + - It stores the RISC Zero image ID to ensure proofs come from an unmodified program + +2. **Proof Generation** + - User requests to increment nonce + - Host program loads current nonce from Solana + - Generates proof using RISC Zero guest program + - Proof demonstrates user of the signing account has run the guest program + +3. **On-chain Verification** + - Host submits proof to Solana program + - Program validates: + - Proof is for correct image ID + - Nonce value is incremented correctly + - Sender's public key matches proof + - If valid, nonce is incremented + +## Key Components + +### Solana Program (`programs/solana-examples/src/lib.rs`) +Handles on-chain state and verification logic: +- Stores current nonce and program image ID +- Verifies proofs through Verifier Router +- Updates state when proofs are valid + +### Guest Program (`hello-world/methods/guest/src/main.rs`) +Simple program that: +- Takes current nonce as input +- Increments nonce value +- Outputs incremented value and public key into the proofs journal + +### Host Program (`hello-world/host/src/main.rs`) +Orchestrates the proof system: +- Initializes the Solana example program if not currently initialized +- Reads current state from Solana +- Generates proofs using guest program +- Submits proofs to Solana program + +## Development Notes + +- The Verifier Router system must be deployed before the example project +- Use `solana logs` to monitor program output during testing +- Program IDs are deterministic based on `Anchor.toml` configuration + +## Troubleshooting + +If you encounter issues: + +1. Verify local validator is running: +```bash +solana cluster-version +``` + +2. Check account balance: +```bash +solana balance +``` + +3. Reset local validator if needed: +```bash +solana-test-validator -r +``` + +4. Verify program deployment: +```bash +solana program show --programs +``` \ No newline at end of file diff --git a/solana-examples/hello-world/README.md b/solana-examples/hello-world/README.md deleted file mode 100644 index df70292..0000000 --- a/solana-examples/hello-world/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# RISC Zero Rust Starter Template - -Welcome to the RISC Zero Rust Starter Template! This template is intended to -give you a starting point for building a project using the RISC Zero zkVM. -Throughout the template (including in this README), you'll find comments -labelled `TODO` in places where you'll need to make changes. To better -understand the concepts behind this template, check out the [zkVM -Overview][zkvm-overview]. - -## Quick Start - -First, make sure [rustup] is installed. The -[`rust-toolchain.toml`][rust-toolchain] file will be used by `cargo` to -automatically install the correct version. - -To build all methods and execute the method within the zkVM, run the following -command: - -```bash -cargo run -``` - -This is an empty template, and so there is no expected output (until you modify -the code). - -### Executing the Project Locally in Development Mode - -During development, faster iteration upon code changes can be achieved by leveraging [dev-mode], we strongly suggest activating it during your early development phase. Furthermore, you might want to get insights into the execution statistics of your project, and this can be achieved by specifying the environment variable `RUST_LOG="[executor]=info"` before running your project. - -Put together, the command to run your project in development mode while getting execution statistics is: - -```bash -RUST_LOG="[executor]=info" RISC0_DEV_MODE=1 cargo run -``` - -### Running Proofs Remotely on Bonsai - -_Note: The Bonsai proving service is still in early Alpha; an API key is -required for access. [Click here to request access][bonsai access]._ - -If you have access to the URL and API key to Bonsai you can run your proofs -remotely. To prove in Bonsai mode, invoke `cargo run` with two additional -environment variables: - -```bash -BONSAI_API_KEY="YOUR_API_KEY" BONSAI_API_URL="BONSAI_URL" cargo run -``` - -## How to Create a Project Based on This Template - -Search this template for the string `TODO`, and make the necessary changes to -implement the required feature described by the `TODO` comment. Some of these -changes will be complex, and so we have a number of instructional resources to -assist you in learning how to write your own code for the RISC Zero zkVM: - -- The [RISC Zero Developer Docs][dev-docs] is a great place to get started. -- Example projects are available in the [examples folder][examples] of - [`risc0`][risc0-repo] repository. -- Reference documentation is available at [https://docs.rs][docs.rs], including - [`risc0-zkvm`][risc0-zkvm], [`cargo-risczero`][cargo-risczero], - [`risc0-build`][risc0-build], and [others][crates]. - -## Directory Structure - -It is possible to organize the files for these components in various ways. -However, in this starter template we use a standard directory structure for zkVM -applications, which we think is a good starting point for your applications. - -```text -project_name -├── Cargo.toml -├── host -│ ├── Cargo.toml -│ └── src -│ └── main.rs <-- [Host code goes here] -└── methods - ├── Cargo.toml - ├── build.rs - ├── guest - │ ├── Cargo.toml - │ └── src - │ └── method_name.rs <-- [Guest code goes here] - └── src - └── lib.rs -``` - -## Video Tutorial - -For a walk-through of how to build with this template, check out this [excerpt -from our workshop at ZK HACK III][zkhack-iii]. - -## Questions, Feedback, and Collaborations - -We'd love to hear from you on [Discord][discord] or [Twitter][twitter]. - -[bonsai access]: https://bonsai.xyz/apply -[cargo-risczero]: https://docs.rs/cargo-risczero -[crates]: https://github.com/risc0/risc0/blob/main/README.md#rust-binaries -[dev-docs]: https://dev.risczero.com -[dev-mode]: https://dev.risczero.com/api/generating-proofs/dev-mode -[discord]: https://discord.gg/risczero -[docs.rs]: https://docs.rs/releases/search?query=risc0 -[examples]: https://github.com/risc0/risc0/tree/main/examples -[risc0-build]: https://docs.rs/risc0-build -[risc0-repo]: https://www.github.com/risc0/risc0 -[risc0-zkvm]: https://docs.rs/risc0-zkvm -[rust-toolchain]: rust-toolchain.toml -[rustup]: https://rustup.rs -[twitter]: https://twitter.com/risczero -[zkhack-iii]: https://www.youtube.com/watch?v=Yg_BGqj_6lg&list=PLcPzhUaCxlCgig7ofeARMPwQ8vbuD6hC5&index=5 -[zkvm-overview]: https://dev.risczero.com/zkvm diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index 6f2bbbf..1879df2 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -26,12 +26,47 @@ type PROGRAM = Program>; const SELECTOR: u32 = 1; // Going to assume only one verifier in our test -// Used to convert our image_id from a [u32; 8] into a [u8; 32] as expected of our groth verifier +/// Converts a RISC Zero image ID from [u32; 8] format to [u8; 32] format. +/// +/// This conversion is necessary because RISC Zero generates image IDs as 8 32-bit integers, +/// but the Solana verifier expects a 32-byte array. +/// +/// # Arguments +/// +/// * `input` - The RISC Zero image ID as [u32; 8] +/// +/// # Returns +/// +/// * `[u8; 32]` - The converted image ID as a 32-byte array fn convert_array(input: [u32; 8]) -> [u8; 32] { let bytes: Vec = input.iter().flat_map(|&x| x.to_le_bytes()).collect(); bytes.try_into().unwrap() } +/// Initializes the Solana program by setting up its data account. +/// +/// This function creates and initializes the program data account with: +/// - Initial nonce value of 0 +/// - Specified image ID from the Risc0 Guest ID +/// - Selector for the verifier router +/// +/// # Notice +/// +/// This function can only be called once, if the program data has been previously initialized +/// it will panic. +/// +/// # Arguments +/// +/// * `user` - Keypair used for signing the initialization transaction and paying rent +/// * `example_program` - Address to the deployed Solana program +/// * `program_data_address` - PDA address where program data will be stored +/// +/// # Panics +/// +/// This function will panic if: +/// - Account already exists +/// - Transaction submission fails +/// - Insufficient balance for account creation async fn init(user: Arc, example_program: &PROGRAM, program_data_address: Pubkey) { info!("Attempting to initilize program data"); @@ -55,6 +90,26 @@ async fn init(user: Arc, example_program: &PROGRAM, program_data_addres info!("Transaction Successful, our program is initialized and now ready for verifying proofs"); } +/// Increments the program's nonce value by generating and submitting a zero-knowledge proof. +/// +/// This function: +/// 1. Reads current nonce from program data on the Solana blockchain +/// 2. Generates a ZK proof from the guest program +/// 3. Submits the proof to the example Solana program for verification +/// +/// # Arguments +/// +/// * `user` - Keypair used for signing transactions +/// * `example_program` - Address to the deployed Solana example program +/// * `program_data_address` - PDA Address of the program's data account from the Solana example program +/// +/// # Panics +/// +/// This function will panic if: +/// - Its unable to fetch current program data from the program_data_address +/// - Proof generation fails +/// - Transaction submission fails +/// - Proof verification fails on-chain async fn increment_nonce( user: Arc, example_program: PROGRAM, @@ -142,6 +197,30 @@ async fn increment_nonce( info!("Transaction successfully, nonce incremented"); } +/// Main entry point for the host program that demonstrates zero-knowledge proof integration with Solana. +/// +/// The program will: +/// - Create a new keypair for transactions +/// - Request an airdrop +/// - Wait for airdrop confirmation +/// - Initialize program data if it doesn't exist +/// - Execute nonce increment with proof verification +/// +/// # Panics +/// +/// Will panic if: +/// - Unable to connect to Solana cluster +/// - Airdrop request fails +/// - Program initialization fails +/// - Proof generation or verification fails +/// +/// # Environment +/// +/// Requires: +/// - Local Solana validator running +/// - Verifier router program deployed +/// - Example program deployed +/// - RUST_LOG environment variable for logging (optional) #[tokio::main] async fn main() { // Initialize tracing. In order to view logs, run `RUST_LOG=info cargo run` diff --git a/solana-examples/shared/src/lib.rs b/solana-examples/shared/src/lib.rs index 3b35eb4..58acd24 100644 --- a/solana-examples/shared/src/lib.rs +++ b/solana-examples/shared/src/lib.rs @@ -1,3 +1,5 @@ +// Anchor uses an old version of Borsh 0.10.3 make sure your project +// uses this version for compatibility in anchor use borsh::{BorshDeserialize, BorshSerialize}; // This is where we define data that will be shared between our @@ -7,26 +9,3 @@ pub struct IncrementNonceArguments { pub account: [u8; 32], pub nonce: u32, } - -#[cfg(test)] -mod tests { - // Note this useful idiom: importing names from outer (for mod tests) scope. - use super::*; - - #[test] - fn serialize_deserialize() { - let nonce_arguments = IncrementNonceArguments { - account: [0xCA; 32], - nonce: 16, - }; - println!("Current data as nonce_arguments: {nonce_arguments:#?}"); - let mut buffer = Vec::new(); - nonce_arguments.serialize(&mut buffer).unwrap(); - println!("Current buffer is {buffer:#?}"); - // Attempt to parse it out - let journal_data: IncrementNonceArguments = - BorshDeserialize::try_from_slice(&buffer).unwrap(); - - println!("Current data in journal_data is: {journal_data:#?}"); - } -} diff --git a/solana-examples/tests/solana-examples.ts b/solana-examples/tests/solana-examples.ts deleted file mode 100644 index 88b31c9..0000000 --- a/solana-examples/tests/solana-examples.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as anchor from "@coral-xyz/anchor"; -import { Program } from "@coral-xyz/anchor"; -import { SolanaExamples } from "../target/types/solana_examples"; - -describe("solana-examples", () => { - // Configure the client to use the local cluster. - anchor.setProvider(anchor.AnchorProvider.env()); - - const program = anchor.workspace.SolanaExamples as Program; - - it("Is initialized!", async () => { - // Add your test here. - const tx = await program.methods.initialize().rpc(); - console.log("Your transaction signature", tx); - }); -}); diff --git a/solana-ownable/ownable/README b/solana-ownable/ownable/README new file mode 100644 index 0000000..fde4a59 --- /dev/null +++ b/solana-ownable/ownable/README @@ -0,0 +1,163 @@ +# Ownable for Anchor + +A Rust library that provides secure two-step ownership transfer functionality for Solana programs built with the Anchor framework. This implementation follows similar patterns to OpenZeppelin's Ownable2Step contract while leveraging Anchor's account system. + +## Features + +- Two-step ownership transfer process to prevent accidental transfers +- Ownership renouncement capability +- Transfer cancellation by either current or pending owner +- Full test coverage +- Minimal additional account space (66 bytes) +- Derive macro for easy integration + +## Installation + +Add the following to your program's `Cargo.toml`: + +```toml +[dependencies] +# TODO: crate not yet published +``` + +## Usage + +1. Add the `Ownable` derive macro to your account struct and include an `ownership` field: + +```rust +use ownable::*; + +#[account] +#[derive(Ownable)] +pub struct MyAccount { + pub ownership: Ownership, // Must be named "ownership" + // ... other fields +} +``` + +2. Implement the required instruction handlers in your program: + +```rust +#[program] +pub mod my_program { + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + // Initialize ownership with the authority's public key + ctx.accounts.state.ownership = Ownership::new(ctx.accounts.authority.key())?; + Ok(()) + } + + pub fn transfer_ownership( + ctx: Context, + new_owner: Pubkey, + ) -> Result<()> { + MyAccount::transfer_ownership(ctx, new_owner) + } + + pub fn accept_ownership(ctx: Context) -> Result<()> { + MyAccount::accept_ownership(ctx) + } + + pub fn renounce_ownership(ctx: Context) -> Result<()> { + MyAccount::renounce_ownership(ctx) + } + + pub fn cancel_transfer(ctx: Context) -> Result<()> { + MyAccount::cancel_transfer(ctx) + } +} +``` + +## Account Space + +When initializing an account that implements `Ownable`, make sure to allocate enough space for the ownership data: +- Ownership struct size: 66 bytes (2 optional Pubkeys: 33 bytes each) +- Add this to your existing account size calculation + +Example: +```rust +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account( + init, + payer = authority, + space = 8 + // Account discriminator + 66 + // Ownership struct + 32 // Other account data + )] + pub account: Account<'info, MyAccount>, + #[account(mut)] + pub authority: Signer<'info>, + pub system_program: Program<'info, System>, +} +``` + +## Ownership Transfer Process + +1. Current owner initiates transfer: +```typescript +await program.methods + .transferOwnership(newOwnerPubkey) + .accounts({ + state: statePubkey, + authority: currentOwner.publicKey, + }) + .signers([currentOwner]) + .rpc(); +``` + +2. New owner accepts transfer: +```typescript +await program.methods + .acceptOwnership() + .accounts({ + state: statePubkey, + authority: newOwner.publicKey, + }) + .signers([newOwner]) + .rpc(); +``` + +Either party can cancel the transfer before acceptance: +```typescript +await program.methods + .cancelTransfer() + .accounts({ + state: statePubkey, + authority: ownerOrPendingOwner.publicKey, + }) + .signers([ownerOrPendingOwner]) + .rpc(); +``` + +## Error Handling + +The library provides the following error types: +- `NotOwner`: Operation requires current owner +- `CannotTransferToSelf`: Attempted transfer to current owner +- `NoPendingTransfer`: No transfer in progress +- `NotPendingOwner`: Caller is not the pending owner +- `NotOwnerOrPendingOwner`: Caller must be owner or pending owner +- `InvalidAddress`: Cannot transfer to zero address + +## Running Tests + +The library includes comprehensive tests that demonstrate functionality and edge cases. To run the tests: + +1. Navigate to the test-program directory: +```bash +cd test-program +``` + +2. Run the Anchor tests: +```bash +anchor test +``` + +## Security Considerations + +- Be cautious with `renounce_ownership` as it permanently removes owner privileges +- Ensure proper access control in your program's other instructions by checking ownership +- Consider implementing a time delay for ownership transfers in security-critical applications +- Always implement the entire set of required instruction handlers for each account that derives ownership From 3d8ca465c097cf262e36b34cc87cb85022b8a83d Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sat, 28 Dec 2024 07:07:45 -0700 Subject: [PATCH 16/21] Finished the documentation. Fixed a bug in the router storage allocation. --- solana-examples/Anchor.toml | 2 +- solana-examples/README | 3 +++ solana-examples/programs/solana-examples/src/lib.rs | 2 +- solana-verifier/Anchor.toml | 6 +++--- solana-verifier/README.md | 1 + solana-verifier/example.env | 2 +- solana-verifier/programs/groth_16_verifier/src/lib.rs | 2 +- solana-verifier/programs/test_bad_verifier/src/lib.rs | 2 +- solana-verifier/programs/verifier_router/src/lib.rs | 2 +- solana-verifier/programs/verifier_router/src/router/mod.rs | 2 +- .../scripts/bad-verifier/programs/testBadVerifier.ts | 4 ++-- solana-verifier/scripts/groth16/programs/groth16Verifier.ts | 4 ++-- solana-verifier/scripts/utils/ownership.ts | 2 +- .../scripts/verify-router/programs/verifierRouter.ts | 4 ++-- 14 files changed, 21 insertions(+), 17 deletions(-) diff --git a/solana-examples/Anchor.toml b/solana-examples/Anchor.toml index 8369991..37ee603 100644 --- a/solana-examples/Anchor.toml +++ b/solana-examples/Anchor.toml @@ -5,7 +5,7 @@ resolution = true skip-lint = false [programs.localnet] -solana_examples = "AtDe6MQUn7LyiYbHFYe2AyugciHfWnyozstekf7wMFMq" +solana_examples = "5KaqzRRFNVecL4Sgkbjus4j4ZdAWc8oV7Vpz4ZTUEAn8" [registry] url = "https://api.apr.dev" diff --git a/solana-examples/README b/solana-examples/README index 67e515e..9182bc3 100644 --- a/solana-examples/README +++ b/solana-examples/README @@ -57,6 +57,9 @@ yarn install # Sync keys for local deploy anchor keys sync +# Build the programs so that IDLs are generated +anchor build + # Generate client code for scripts before first run yarn run client diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index 5b521ab..8f6688b 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -7,7 +7,7 @@ use verifier_router::program::VerifierRouter as VerifierRouterProgram; use verifier_router::router::Proof; use verifier_router::state::{VerifierEntry, VerifierRouter}; -declare_id!("AtDe6MQUn7LyiYbHFYe2AyugciHfWnyozstekf7wMFMq"); +declare_id!("5KaqzRRFNVecL4Sgkbjus4j4ZdAWc8oV7Vpz4ZTUEAn8"); #[program] pub mod solana_examples { diff --git a/solana-verifier/Anchor.toml b/solana-verifier/Anchor.toml index 5d82627..9aff1c2 100644 --- a/solana-verifier/Anchor.toml +++ b/solana-verifier/Anchor.toml @@ -5,9 +5,9 @@ resolution = true skip-lint = false [programs.localnet] -groth_16_verifier = "GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1" -test_bad_verifier = "2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP" -verifier_router = "6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM" +groth_16_verifier = "EsJUxZK9qexcHRXr1dVoxt2mUhVAyaoRWBaaRxH5zQJD" +test_bad_verifier = "H111vaTfs4ktTvJFqy46UFq5sjcEkixgmHwuHc6oabD8" +verifier_router = "8U8NcScoHfKhbJCCUCM4ckmynCbhFM9Mo2xLVgrbosfh" [registry] url = "https://api.apr.dev" diff --git a/solana-verifier/README.md b/solana-verifier/README.md index c13fed2..aab808a 100644 --- a/solana-verifier/README.md +++ b/solana-verifier/README.md @@ -50,6 +50,7 @@ any non-deployment actions require an account with a 1 SOL minimum balance. 1. Deploy the router and initial verifier: ```bash anchor keys sync +anchor build yarn run client yarn run deploy ``` diff --git a/solana-verifier/example.env b/solana-verifier/example.env index 3e61195..2d88ce1 100644 --- a/solana-verifier/example.env +++ b/solana-verifier/example.env @@ -22,7 +22,7 @@ VERIFIER_ADDRESS="Hs9zHQshowrEM4tyRCv9vwcPkZSBbU1cVCUGLwZmVawa" # Required: Only when running transferOwnership.ts # The public key of the new owner for ownership transfer -NEW_OWNER="AnchoURaVvRYGHqrwEGqr83PUZjZYJu3VCqykkQxRPTo" +NEW_OWNER="5RQ6cFG4ewVF4ceeyqYkxwq9PKawKkVWuKJBJN4wFNgu" # Optional: Owner of the router (used in some scripts for checks) # Default: Uses the local keypair's public key diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index 132e9b8..45b2342 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -12,7 +12,7 @@ mod vk; pub use vk::{VerificationKey, VERIFICATION_KEY}; -declare_id!("GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1"); +declare_id!("EsJUxZK9qexcHRXr1dVoxt2mUhVAyaoRWBaaRxH5zQJD"); const ALLOWED_CONTROL_ROOT: &str = "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs index 55dc53f..415c948 100644 --- a/solana-verifier/programs/test_bad_verifier/src/lib.rs +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -2,7 +2,7 @@ use anchor_lang::prelude::*; use anchor_lang::system_program; use groth_16_verifier::Proof; -declare_id!("2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP"); +declare_id!("H111vaTfs4ktTvJFqy46UFq5sjcEkixgmHwuHc6oabD8"); #[error_code] pub enum VerifierError { diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 3cf97b5..7a0d0d3 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -10,7 +10,7 @@ use estop::*; use router::*; use state::*; -declare_id!("6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM"); +declare_id!("8U8NcScoHfKhbJCCUCM4ckmynCbhFM9Mo2xLVgrbosfh"); /// Verifier Router Program for Anchor /// diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs index 0afbbdf..95d9f13 100644 --- a/solana-verifier/programs/verifier_router/src/router/mod.rs +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -24,7 +24,7 @@ pub struct Initialize<'info> { seeds = [b"router"], bump, payer = authority, - space = 8 + 32 + 33 + 4 + space = 8 + 33 + 33 + 4 )] pub router: Account<'info, VerifierRouter>, diff --git a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts index 9591b49..27d4880 100644 --- a/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts +++ b/solana-verifier/scripts/bad-verifier/programs/testBadVerifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const TEST_BAD_VERIFIER_PROGRAM_ADDRESS = - '2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP' as Address<'2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP'>; + 'H111vaTfs4ktTvJFqy46UFq5sjcEkixgmHwuHc6oabD8' as Address<'H111vaTfs4ktTvJFqy46UFq5sjcEkixgmHwuHc6oabD8'>; export enum TestBadVerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyTestBadVerifierInstruction( } export type ParsedTestBadVerifierInstruction< - TProgram extends string = '2wF5cbppQwdAEr13LUHzqnQ9tZ95YizhLtH65JkcZjnP', + TProgram extends string = 'H111vaTfs4ktTvJFqy46UFq5sjcEkixgmHwuHc6oabD8', > = { instructionType: TestBadVerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts index 1135711..06eadf6 100644 --- a/solana-verifier/scripts/groth16/programs/groth16Verifier.ts +++ b/solana-verifier/scripts/groth16/programs/groth16Verifier.ts @@ -16,7 +16,7 @@ import { import { type ParsedVerifyInstruction } from '../instructions'; export const GROTH16_VERIFIER_PROGRAM_ADDRESS = - 'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1' as Address<'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1'>; + 'EsJUxZK9qexcHRXr1dVoxt2mUhVAyaoRWBaaRxH5zQJD' as Address<'EsJUxZK9qexcHRXr1dVoxt2mUhVAyaoRWBaaRxH5zQJD'>; export enum Groth16VerifierInstruction { Verify, @@ -43,7 +43,7 @@ export function identifyGroth16VerifierInstruction( } export type ParsedGroth16VerifierInstruction< - TProgram extends string = 'GwVHo4q6vcPVPiKzRHagxVCHF9GnfmnBwA2KSoKd3Ev1', + TProgram extends string = 'EsJUxZK9qexcHRXr1dVoxt2mUhVAyaoRWBaaRxH5zQJD', > = { instructionType: Groth16VerifierInstruction.Verify; } & ParsedVerifyInstruction; diff --git a/solana-verifier/scripts/utils/ownership.ts b/solana-verifier/scripts/utils/ownership.ts index 4887268..5e427c4 100644 --- a/solana-verifier/scripts/utils/ownership.ts +++ b/solana-verifier/scripts/utils/ownership.ts @@ -46,7 +46,7 @@ export async function transferOwnership( newOwner: Address ) { logger.info( - `Transferring ownership from ${owner} to new owner: ${newOwner} for router ${routerAddress}` + `Transferring ownership from ${owner.address} to new owner: ${newOwner} for router ${routerAddress}` ); const routerPda = await getRouterPda(routerAddress); diff --git a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts index 055622b..aca2db5 100644 --- a/solana-verifier/scripts/verify-router/programs/verifierRouter.ts +++ b/solana-verifier/scripts/verify-router/programs/verifierRouter.ts @@ -26,7 +26,7 @@ import { } from '../instructions'; export const VERIFIER_ROUTER_PROGRAM_ADDRESS = - '6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM' as Address<'6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM'>; + '8U8NcScoHfKhbJCCUCM4ckmynCbhFM9Mo2xLVgrbosfh' as Address<'8U8NcScoHfKhbJCCUCM4ckmynCbhFM9Mo2xLVgrbosfh'>; export enum VerifierRouterAccount { VerifierEntry, @@ -185,7 +185,7 @@ export function identifyVerifierRouterInstruction( } export type ParsedVerifierRouterInstruction< - TProgram extends string = '6QnGZ6qUAT5DnRLZPs8seCVfZkFnqtJQspqLnTfscnDM', + TProgram extends string = '8U8NcScoHfKhbJCCUCM4ckmynCbhFM9Mo2xLVgrbosfh', > = | ({ instructionType: VerifierRouterInstruction.AcceptOwnership; From 11887c376311578196c30648a715b598622d9af0 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sat, 28 Dec 2024 07:12:12 -0700 Subject: [PATCH 17/21] Renamed README to README.md so that github formats it correctly. --- solana-examples/{README => README.md} | 0 solana-ownable/ownable/{README => README.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename solana-examples/{README => README.md} (100%) rename solana-ownable/ownable/{README => README.md} (100%) diff --git a/solana-examples/README b/solana-examples/README.md similarity index 100% rename from solana-examples/README rename to solana-examples/README.md diff --git a/solana-ownable/ownable/README b/solana-ownable/ownable/README.md similarity index 100% rename from solana-ownable/ownable/README rename to solana-ownable/ownable/README.md From 66622a678162398302f44f82a35257bc6b67a8f1 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Sat, 28 Dec 2024 07:16:11 -0700 Subject: [PATCH 18/21] Update command in readme to add missing part --- solana-examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solana-examples/README.md b/solana-examples/README.md index 9182bc3..87273b4 100644 --- a/solana-examples/README.md +++ b/solana-examples/README.md @@ -165,5 +165,5 @@ solana-test-validator -r 4. Verify program deployment: ```bash -solana program show --programs +solana program show --programs --all ``` \ No newline at end of file From 2e9c2a87a6b8681c3c3946f08a42b90b341a6d89 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Wed, 8 Jan 2025 02:27:56 -0700 Subject: [PATCH 19/21] Made changes suggested by @Hans in initial code review --- solana-examples/Cargo.lock | 5 ----- solana-examples/Cargo.toml | 1 + solana-examples/README.md | 4 ++-- solana-examples/hello-world/host/Cargo.toml | 3 --- solana-examples/hello-world/host/src/main.rs | 14 ++++++++------ solana-examples/hello-world/methods/Cargo.toml | 2 +- .../programs/solana-examples/Cargo.toml | 5 ----- .../programs/solana-examples/src/lib.rs | 6 +++--- solana-ownable/Cargo.toml | 1 + solana-verifier/.eslintignore.swp | Bin 12288 -> 0 bytes solana-verifier/.gitignore | 3 ++- solana-verifier/Cargo.lock | 7 ------- solana-verifier/Cargo.toml | 1 + solana-verifier/README.md | 4 ++-- .../programs/groth_16_verifier/Cargo.toml | 14 -------------- .../programs/test_bad_verifier/src/lib.rs | 12 ++++++------ .../programs/verifier_router/src/estop/mod.rs | 2 +- .../programs/verifier_router/src/lib.rs | 1 - .../programs/verifier_router/src/router/mod.rs | 2 +- solana-verifier/scripts/acceptOwnership.ts | 2 +- solana-verifier/scripts/addVerifier.ts | 2 +- solana-verifier/scripts/codma.ts | 2 +- solana-verifier/scripts/deploy.ts | 4 ++-- solana-verifier/scripts/estop.ts | 2 +- solana-verifier/scripts/renounceOwnership.ts | 2 +- solana-verifier/scripts/transferOwnership.ts | 2 +- solana-verifier/scripts/utils/addVerifier.ts | 2 +- solana-verifier/tests/router-verifier.ts | 6 +++--- 28 files changed, 41 insertions(+), 70 deletions(-) delete mode 100644 solana-verifier/.eslintignore.swp diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock index da20000..0588273 100644 --- a/solana-examples/Cargo.lock +++ b/solana-examples/Cargo.lock @@ -1039,13 +1039,8 @@ name = "groth_16_verifier" version = "0.1.0" dependencies = [ "anchor-lang", - "anyhow", - "ark-bn254", - "ark-serialize", - "borsh 1.5.3", "hex", "num-bigint", - "num-traits", "risc0-zkp", "serde", "solana-program 2.1.6", diff --git a/solana-examples/Cargo.toml b/solana-examples/Cargo.toml index b5b301f..1efe9da 100644 --- a/solana-examples/Cargo.toml +++ b/solana-examples/Cargo.toml @@ -9,6 +9,7 @@ resolver = "2" overflow-checks = true lto = "fat" codegen-units = 1 + [profile.release.build-override] opt-level = 3 incremental = false diff --git a/solana-examples/README.md b/solana-examples/README.md index 87273b4..5a92290 100644 --- a/solana-examples/README.md +++ b/solana-examples/README.md @@ -1,6 +1,6 @@ # Solana Zero-Knowledge Proof Example Project -This project demonstrates how to use the Risc0 zero-knowledge prover with Solana. +This project demonstrates how to use the RISC Zero zero-knowledge prover with Solana. It provides an example Solana program that implements a simple nonce increment system where users must provide valid ZK proofs to increment a nonce value on-chain. @@ -10,7 +10,7 @@ The project consists of several key components: - **Solana Programs**: Smart contracts that handle on-chain verification and state management - `verifier_router`: Routes proof verification requests to appropriate verifiers - - `groth16_verifier`: The Risc0 Groth16 verifier that performs the proof verification + - `groth16_verifier`: The RISC Zero Groth16 verifier that performs the proof verification - `solana-examples`: Example program that uses the data from a Risc0 Proof - **RISC Zero Guest Program**: Off-chain program that generates proofs diff --git a/solana-examples/hello-world/host/Cargo.toml b/solana-examples/hello-world/host/Cargo.toml index 0cb6489..27a67b0 100644 --- a/solana-examples/hello-world/host/Cargo.toml +++ b/solana-examples/hello-world/host/Cargo.toml @@ -7,13 +7,10 @@ edition = "2021" methods = { path = "../methods" } risc0-zkvm = { version = "1.2.0", default-features = false, features = ["prove"]} tracing-subscriber = { version = "0.3", features = ["env-filter"] } -serde = "1.0" solana-examples = { path = "../../programs/solana-examples", features = ["no-entrypoint"] } groth_16_verifier = { path = "../../../solana-verifier/programs/groth_16_verifier", features = ["no-entrypoint", "client"]} verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["no-entrypoint"]} anchor-client = { version = "0.30.1", features = ["async"]} -serde_json = "1.0.133" -solana-program = "2.1.6" tokio = { version = "1.42.0", features = ["macros"] } tracing = "0.1.41" borsh = { version = "0.10.3" } diff --git a/solana-examples/hello-world/host/src/main.rs b/solana-examples/hello-world/host/src/main.rs index 1879df2..c663023 100644 --- a/solana-examples/hello-world/host/src/main.rs +++ b/solana-examples/hello-world/host/src/main.rs @@ -5,20 +5,22 @@ use anchor_client::solana_sdk::{ pubkey::Pubkey, }; use anchor_client::Program; -// These constants represent the RISC-V ELF and the image ID generated by risc0-build. -// The ELF is used for proving and the ID is used for verification. use anchor_client::{ solana_sdk::{signature::Keypair, signer::Signer}, Client, Cluster, }; use borsh::to_vec; use groth_16_verifier::client::receipt_to_proof; -use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; use risc0_zkvm::sha::Digestible; use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts}; use solana_examples::{accounts, instruction, ProgramData}; use std::sync::Arc; use tracing::{debug, info, trace}; + +// These constants represent the RISC-V ELF and the image ID generated by risc0-build. +// The ELF is used for proving and the ID is used for verification. +use methods::{HELLO_GUEST_ELF, HELLO_GUEST_ID}; + // A shared library that contains the inputs / outputs of our guest use shared::IncrementNonceArguments; @@ -47,7 +49,7 @@ fn convert_array(input: [u32; 8]) -> [u8; 32] { /// /// This function creates and initializes the program data account with: /// - Initial nonce value of 0 -/// - Specified image ID from the Risc0 Guest ID +/// - Specified image ID from the RISC Zero Guest ID /// - Selector for the verifier router /// /// # Notice @@ -68,7 +70,7 @@ fn convert_array(input: [u32; 8]) -> [u8; 32] { /// - Transaction submission fails /// - Insufficient balance for account creation async fn init(user: Arc, example_program: &PROGRAM, program_data_address: Pubkey) { - info!("Attempting to initilize program data"); + info!("Attempting to initialize program data"); example_program .request() @@ -228,7 +230,7 @@ async fn main() { .with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env()) .init(); - info!("Example Risc0 Solana Program has started!"); + info!("Example RISC Zero Solana Program has started!"); // Construct a new user and request solana for the transaction let user = Arc::new(Keypair::new()); diff --git a/solana-examples/hello-world/methods/Cargo.toml b/solana-examples/hello-world/methods/Cargo.toml index f22f763..aa1546b 100644 --- a/solana-examples/hello-world/methods/Cargo.toml +++ b/solana-examples/hello-world/methods/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [build-dependencies] -risc0-build = { version = "1.1.3" } +risc0-build = { version = "1.2.0" } [package.metadata.risc0] methods = ["guest"] diff --git a/solana-examples/programs/solana-examples/Cargo.toml b/solana-examples/programs/solana-examples/Cargo.toml index e33ecd6..9da7f28 100644 --- a/solana-examples/programs/solana-examples/Cargo.toml +++ b/solana-examples/programs/solana-examples/Cargo.toml @@ -16,11 +16,6 @@ no-idl = [] no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] -# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 -[patch.crates-io] -curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } - - [dependencies] anchor-lang = "0.30.1" verifier_router = { path = "../../../solana-verifier/programs/verifier_router", features = ["cpi"] } diff --git a/solana-examples/programs/solana-examples/src/lib.rs b/solana-examples/programs/solana-examples/src/lib.rs index 8f6688b..faf5633 100644 --- a/solana-examples/programs/solana-examples/src/lib.rs +++ b/solana-examples/programs/solana-examples/src/lib.rs @@ -15,7 +15,7 @@ pub mod solana_examples { use super::*; - /// This allows us to initialize our program by setting the selector of the Risc0 Router to use for + /// This allows us to initialize our program by setting the selector of the RISC Zero Router to use for /// proofs, the image_id of our own example program, and by setting the default value for our internal /// nonce. We may want to allow changing the selector so that we can use different verifiers in the future. /// The image ID is tightly coupled with our guest program and prevents a user from changing the off-chain @@ -59,7 +59,7 @@ pub mod solana_examples { // We hash our journal outputs to get a journal digest let journal_digest = hashv(&[journal_outputs.as_slice()]).to_bytes(); - // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program + // Next we collect the accounts necessary for making the CPI call to the RISC Zero Proof Verifier program let cpi_accounts = Verify { router: ctx.accounts.router_account.to_account_info(), verifier_entry: ctx.accounts.verifier_entry.to_account_info(), @@ -77,7 +77,7 @@ pub mod solana_examples { // We setup our CPI context for the router let cpi_ctx = CpiContext::new(ctx.accounts.router.to_account_info(), cpi_accounts); - // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid + // We make the CPI call to the RISC Zero Verifier Router which if it returns means the proof is valid // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although // behavior would be the same if I ignored the result. verifier_router::cpi::verify(cpi_ctx, selector, proof, image_id, journal_digest).unwrap(); diff --git a/solana-ownable/Cargo.toml b/solana-ownable/Cargo.toml index 7813637..d4b1c24 100644 --- a/solana-ownable/Cargo.toml +++ b/solana-ownable/Cargo.toml @@ -10,6 +10,7 @@ resolver = "2" overflow-checks = true lto = "fat" codegen-units = 1 + [profile.release.build-override] opt-level = 3 incremental = false diff --git a/solana-verifier/.eslintignore.swp b/solana-verifier/.eslintignore.swp deleted file mode 100644 index 89ebca69720072a31740ba1312c31b4507eaf2f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI%u};G<5P;z;%m@S$bAb)XbqWit3`h)YZKX~qZQRNb?8-@-4c>&E=ioh9`UJcI ziJA-yVMgUY$vXRTvUJ~OWfG0)_4rsOA$Ey()t6u6X49tz zzA!-z3g6QGQeUVGAD*&BJT*GlY#Qm*uIjDId>Xr0Z<1P>U}x3@-7{HgU2f;j2h(yr zWdsmt6IkXmb+tFVyy!<&%h~Bk_vmog)=eD&1Q0*~0R#|0009KHP#|A)vMyKk|G# { ) -> Result<()> { // Your programs initial code... - // Next we collect the accounts necessary for making the CPI call to the Risc0 Proof Verifier program + // Next we collect the accounts necessary for making the CPI call to the RISC Zero Proof Verifier program let cpi_accounts = Verify { router: ctx.accounts.router_account.to_account_info(), verifier_entry: ctx.accounts.verifier_entry.to_account_info(), @@ -118,7 +118,7 @@ pub struct IncrementNonce<'info> { // We setup our CPI context for the router let cpi_ctx = CpiContext::new(ctx.accounts.router.to_account_info(), cpi_accounts); - // We make the CPI call to the Risc0 Verifier Router which if it returns means the proof is valid + // We make the CPI call to the RISC Zero Verifier Router which if it returns means the proof is valid // In Solana you cannot recover from a CPI call which returns an error, to make this clear I explicitly unwrap although // behavior would be the same if I ignored the result. verifier_router::cpi::verify(cpi_ctx, selector, proof, image_id, journal_digest).unwrap(); diff --git a/solana-verifier/programs/groth_16_verifier/Cargo.toml b/solana-verifier/programs/groth_16_verifier/Cargo.toml index 4211738..3a74cef 100644 --- a/solana-verifier/programs/groth_16_verifier/Cargo.toml +++ b/solana-verifier/programs/groth_16_verifier/Cargo.toml @@ -19,23 +19,9 @@ client = ["risc0-zkvm"] [dependencies] anchor-lang = "0.30.1" -anyhow = "1.0.86" -ark-bn254 = "0.4.0" -ark-serialize = "0.4.2" -borsh = "1.5.1" hex = "0.4.3" num-bigint = "0.4.6" -num-traits = "0.2.19" risc0-zkp = { version = "1.2.0", default-features = false } serde = { version = "1.0.204", features = ["derive"] } solana-program = "=2.1.6" risc0-zkvm = { version = "1.2.0", default-features = false, optional = true} - -# Patch zerorize, see: https://github.com/solana-labs/solana/issues/26688 -[patch.crates-io] -curve25519-dalek = { git = "https://github.com/ivs/curve25519-dalek", branch = "rustls-dep-hell" } - - -[dev-dependencies] -serde_json = "1.0.120" -arrayvec = "0.7.4" diff --git a/solana-verifier/programs/test_bad_verifier/src/lib.rs b/solana-verifier/programs/test_bad_verifier/src/lib.rs index 415c948..6cd3fe9 100644 --- a/solana-verifier/programs/test_bad_verifier/src/lib.rs +++ b/solana-verifier/programs/test_bad_verifier/src/lib.rs @@ -27,10 +27,10 @@ pub mod test_bad_verifier { /// Simple verifier that returns false for any proof except for a proof that has a null claim digest /// /// To produce a valid proof with this broken verifier send a proof for an empty claim digest where all proof - /// values are null: - /// - pi_a = [0; 64] - /// - pi_b = [0; 128] - /// - pi_c = [0; 64] + /// values are as follows: + /// - pi_a = [0xCA; 64] + /// - pi_b = [0xFE; 128] + /// - pi_c = [0xCA; 64] /// /// All other proofs will be rejected by this verifier. pub fn verify( @@ -40,8 +40,8 @@ pub mod test_bad_verifier { journal_digest: [u8; 32], ) -> Result<()> { let empty_32: [u8; 32] = [0; 32]; - let empty_64: [u8; 64] = [0; 64]; - let empty_128: [u8; 128] = [0; 128]; + let empty_64: [u8; 64] = [0xCA; 64]; + let empty_128: [u8; 128] = [0xFE; 128]; require!(image_id == empty_32, VerifierError::VerificationError); require!(journal_digest == empty_32, VerifierError::VerificationError); diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs index 445ccff..53929d1 100644 --- a/solana-verifier/programs/verifier_router/src/estop/mod.rs +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -191,7 +191,7 @@ fn close_verifier<'info>( /// immediately disable the verifier from future use. /// /// If you believe you have identified a vulnerability and are unable to submit an -/// invalid proof please contact the Risc0 team immediately if possible. +/// invalid proof please contact the RISC Zero team immediately if possible. /// /// # Arguments /// * `ctx` - The EmergencyStop context containing validated accounts diff --git a/solana-verifier/programs/verifier_router/src/lib.rs b/solana-verifier/programs/verifier_router/src/lib.rs index 7a0d0d3..db15196 100644 --- a/solana-verifier/programs/verifier_router/src/lib.rs +++ b/solana-verifier/programs/verifier_router/src/lib.rs @@ -38,7 +38,6 @@ pub mod verifier_router { router::add_verifier(ctx, selector) } - /// This is a test to explore what happens with the text here pub fn verify( ctx: Context, selector: u32, diff --git a/solana-verifier/programs/verifier_router/src/router/mod.rs b/solana-verifier/programs/verifier_router/src/router/mod.rs index 95d9f13..8f3196b 100644 --- a/solana-verifier/programs/verifier_router/src/router/mod.rs +++ b/solana-verifier/programs/verifier_router/src/router/mod.rs @@ -18,7 +18,7 @@ use groth_16_verifier::cpi::accounts::VerifyProof; #[derive(Accounts)] pub struct Initialize<'info> { /// The router account PDA to be initialized - /// Space allocated for discriminator + owner (Pubkey) + pending_owner: (Option) + count (u32) + /// Space allocated for discriminator + owner (Option) + pending_owner: (Option) + count (u32) #[account( init, seeds = [b"router"], diff --git a/solana-verifier/scripts/acceptOwnership.ts b/solana-verifier/scripts/acceptOwnership.ts index 19e78e7..cccb83c 100644 --- a/solana-verifier/scripts/acceptOwnership.ts +++ b/solana-verifier/scripts/acceptOwnership.ts @@ -1,7 +1,7 @@ /** * # acceptOwnership.ts * - * Completes the ownership transfer of the Risc0 Router by accepting the pending transfer. This script must be run by the new owner after the + * Completes the ownership transfer of the RISC Zero Router by accepting the pending transfer. This script must be run by the new owner after the * transferOwnership script has been executed by the current owner. * * ## Environment Variables diff --git a/solana-verifier/scripts/addVerifier.ts b/solana-verifier/scripts/addVerifier.ts index 8b7a067..6729b15 100644 --- a/solana-verifier/scripts/addVerifier.ts +++ b/solana-verifier/scripts/addVerifier.ts @@ -1,5 +1,5 @@ /** - * Adds a new verifier program to an existing Risc0 Router. This script handles changing the verifier's upgrade authority to the router and registering it in the router's registry. + * Adds a new verifier program to an existing RISC Zero Router. This script handles changing the verifier's upgrade authority to the router and registering it in the router's registry. * * ## Environment Variables * diff --git a/solana-verifier/scripts/codma.ts b/solana-verifier/scripts/codma.ts index f2b9214..73dbc5c 100644 --- a/solana-verifier/scripts/codma.ts +++ b/solana-verifier/scripts/codma.ts @@ -1,5 +1,5 @@ /** - * Generates TypeScript client code from Anchor IDL files for the Risc0 Router and related programs. + * Generates TypeScript client code from Anchor IDL files for the RISC Zero Router and related programs. * This script uses Codama to create strongly-typed TypeScript interfaces and functions for interacting with the Solana programs. * * ## Overview diff --git a/solana-verifier/scripts/deploy.ts b/solana-verifier/scripts/deploy.ts index d657235..26af8f9 100644 --- a/solana-verifier/scripts/deploy.ts +++ b/solana-verifier/scripts/deploy.ts @@ -1,5 +1,5 @@ /** - * Builds, deploys, and initializes the Risc0 Verification Router and Initial Groth16 Verifier program on the Solana blockchain. + * Builds, deploys, and initializes the RISC Zero Verification Router and Initial Groth16 Verifier program on the Solana blockchain. * This script handles the complete deployment pipeline including building programs, deploying them on-chain, and * performing initial setup. * @@ -64,7 +64,7 @@ import { addVerifier } from "./utils/addVerifier"; const logger = createLogger(); async function run_deployment(): Promise { - logger.info("Risc0 Solana Program Deployment Script started"); + logger.info("RISC Zero Solana Program Deployment Script started"); const owner = await getTransactionSigner(); const deployer = await getLocalKeypair(); diff --git a/solana-verifier/scripts/estop.ts b/solana-verifier/scripts/estop.ts index 248a7dc..b176916 100644 --- a/solana-verifier/scripts/estop.ts +++ b/solana-verifier/scripts/estop.ts @@ -1,5 +1,5 @@ /** - * Executes an emergency stop on a verifier in the Risc0 Router. This is an irreversible action that will permanently disable the specified verifier. + * Executes an emergency stop on a verifier in the RISC Zero Router. This is an irreversible action that will permanently disable the specified verifier. * The script includes multiple confirmation steps to prevent accidental execution. * * ## Environment Variables diff --git a/solana-verifier/scripts/renounceOwnership.ts b/solana-verifier/scripts/renounceOwnership.ts index 7ddede7..17633d6 100644 --- a/solana-verifier/scripts/renounceOwnership.ts +++ b/solana-verifier/scripts/renounceOwnership.ts @@ -1,5 +1,5 @@ /** - * Permanently renounces ownership of the Risc0 Router. This is an irreversible action that will prevent any new verifiers from being added to the router. + * Permanently renounces ownership of the RISC Zero Router. This is an irreversible action that will prevent any new verifiers from being added to the router. * After renouncement, emergency stops can only be triggered by providing proof of exploitation. The script includes confirmation steps to prevent accidental * execution. * diff --git a/solana-verifier/scripts/transferOwnership.ts b/solana-verifier/scripts/transferOwnership.ts index 213ec39..1f403cc 100644 --- a/solana-verifier/scripts/transferOwnership.ts +++ b/solana-verifier/scripts/transferOwnership.ts @@ -1,5 +1,5 @@ /** - * Initiates the transfer of ownership for the Risc0 Router to a new owner. This is the first step in a two-step ownership transfer process. After this script is run, + * Initiates the transfer of ownership for the RISC Zero Router to a new owner. This is the first step in a two-step ownership transfer process. After this script is run, * the new owner must accept ownership using the acceptOwnership script. * * ## Environment Variables diff --git a/solana-verifier/scripts/utils/addVerifier.ts b/solana-verifier/scripts/utils/addVerifier.ts index 311bfd7..4c4e2c0 100644 --- a/solana-verifier/scripts/utils/addVerifier.ts +++ b/solana-verifier/scripts/utils/addVerifier.ts @@ -52,7 +52,7 @@ export async function addVerifier( owner: TransactionSigner ): Promise { logger.info( - `Risc0 Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}` + `RISC Zero Verifier being with address: ${verifierAddress} being added to the router at address: ${routerAddress}` ); logger.debug(`Using the address: ${owner.address} as owner`); diff --git a/solana-verifier/tests/router-verifier.ts b/solana-verifier/tests/router-verifier.ts index 0928fe0..36e3ba1 100644 --- a/solana-verifier/tests/router-verifier.ts +++ b/solana-verifier/tests/router-verifier.ts @@ -99,9 +99,9 @@ describe("verifier-router", () => { // Test Proof for the Test Bad Verifier const emptyProof: Proof = { - piA: new Uint8Array(64), // Empty 64 Byte array - piB: new Array(128), // Empty 128 byte array - piC: new Uint8Array(64), // Empty 64 byte array + piA: new Uint8Array(64).fill(0xca), // Empty 64 Byte array + piB: new Array(128).fill(0xfe), // Empty 128 byte array + piC: new Uint8Array(64).fill(0xca), // Empty 64 byte array }; const emptyJournalDigest = new Uint8Array(32); // Empty Journal Digest From 487f3452b0fd4f2b655db6ba21083e82ec4809ab Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Wed, 8 Jan 2025 04:27:59 -0700 Subject: [PATCH 20/21] adds back the unit tests from the groth 16 verifier --- solana-examples/Cargo.lock | 4 +- solana-examples/README.md | 2 +- solana-verifier/Cargo.lock | 8 +- .../programs/groth_16_verifier/Cargo.toml | 12 +- .../programs/groth_16_verifier/src/lib.rs | 424 +++++++++++++++++- .../programs/groth_16_verifier/src/vk.rs | 6 +- .../test/data/claim_digest.bin | 1 + .../test/data/compressed_proof.bin | Bin 0 -> 128 bytes .../test/data/r0_test_vk.json | 84 ++++ .../groth_16_verifier/test/data/receipt.json | 1 + 10 files changed, 532 insertions(+), 10 deletions(-) create mode 100644 solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin create mode 100644 solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin create mode 100644 solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json create mode 100644 solana-verifier/programs/groth_16_verifier/test/data/receipt.json diff --git a/solana-examples/Cargo.lock b/solana-examples/Cargo.lock index 0588273..e47901e 100644 --- a/solana-examples/Cargo.lock +++ b/solana-examples/Cargo.lock @@ -217,9 +217,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "ark-bn254" diff --git a/solana-examples/README.md b/solana-examples/README.md index 5a92290..9872efd 100644 --- a/solana-examples/README.md +++ b/solana-examples/README.md @@ -11,7 +11,7 @@ The project consists of several key components: - **Solana Programs**: Smart contracts that handle on-chain verification and state management - `verifier_router`: Routes proof verification requests to appropriate verifiers - `groth16_verifier`: The RISC Zero Groth16 verifier that performs the proof verification - - `solana-examples`: Example program that uses the data from a Risc0 Proof + - `solana-examples`: Example program that uses the data from a RISC Zero Proof - **RISC Zero Guest Program**: Off-chain program that generates proofs - Located in `hello-world/methods/guest` diff --git a/solana-verifier/Cargo.lock b/solana-verifier/Cargo.lock index 879847f..a969c06 100644 --- a/solana-verifier/Cargo.lock +++ b/solana-verifier/Cargo.lock @@ -217,9 +217,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "ark-bn254" @@ -1027,11 +1027,15 @@ name = "groth_16_verifier" version = "0.1.0" dependencies = [ "anchor-lang", + "anyhow", + "ark-bn254", + "ark-serialize", "hex", "num-bigint", "risc0-zkp", "risc0-zkvm", "serde", + "serde_json", "solana-program 2.1.6", ] diff --git a/solana-verifier/programs/groth_16_verifier/Cargo.toml b/solana-verifier/programs/groth_16_verifier/Cargo.toml index 3a74cef..1a5069a 100644 --- a/solana-verifier/programs/groth_16_verifier/Cargo.toml +++ b/solana-verifier/programs/groth_16_verifier/Cargo.toml @@ -15,7 +15,7 @@ no-entrypoint = [] no-idl = [] no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] -client = ["risc0-zkvm"] +client = ["risc0-zkvm", "anyhow", "ark-bn254", "ark-serialize"] [dependencies] anchor-lang = "0.30.1" @@ -25,3 +25,13 @@ risc0-zkp = { version = "1.2.0", default-features = false } serde = { version = "1.0.204", features = ["derive"] } solana-program = "=2.1.6" risc0-zkvm = { version = "1.2.0", default-features = false, optional = true} +anyhow = { version = "1.0.95", optional = true } +ark-bn254 = { version = "0.4.0", optional = true } +ark-serialize = { version = "0.4.2", optional = true } + +[dev-dependencies] +risc0-zkvm = { version = "1.1.1", default-features = false } +serde_json = "1.0.120" +anyhow = { version = "1.0.95" } +ark-bn254 = "0.4.0" +ark-serialize = "0.4.2" \ No newline at end of file diff --git a/solana-verifier/programs/groth_16_verifier/src/lib.rs b/solana-verifier/programs/groth_16_verifier/src/lib.rs index 45b2342..6a687f7 100644 --- a/solana-verifier/programs/groth_16_verifier/src/lib.rs +++ b/solana-verifier/programs/groth_16_verifier/src/lib.rs @@ -219,12 +219,190 @@ fn is_scalar_valid(scalar: &[u8; 32]) -> bool { false // scalar == q } -#[cfg(feature = "client")] +#[cfg(any(feature = "client", test))] pub mod client { + use super::vk::{G1_LEN, G2_LEN}; use super::Proof; use crate::BASE_FIELD_MODULUS_Q; + use anchor_lang::solana_program::alt_bn128::compression::prelude::convert_endianness; + use anyhow::{anyhow, Error, Result}; + use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate}; use num_bigint::BigUint; use risc0_zkvm::{Groth16Receipt, ReceiptClaim}; + use serde::{Deserialize, Deserializer, Serialize}; + use std::{convert::TryInto, fs::File, io::Write}; + + type G1 = ark_bn254::g1::G1Affine; + type G2 = ark_bn254::g2::G2Affine; + + #[derive(Deserialize, Serialize, Debug, PartialEq)] + struct ProofJson { + pi_a: Vec, + pi_b: Vec>, + pi_c: Vec, + protocol: String, + curve: String, + } + + #[derive(Deserialize, Serialize, Debug, PartialEq)] + struct VerifyingKeyJson { + protocol: String, + curve: String, + #[serde(rename = "nPublic")] + nr_pubinputs: u32, + vk_alpha_1: Vec, + vk_beta_2: Vec>, + vk_gamma_2: Vec>, + vk_delta_2: Vec>, + #[serde(rename = "IC")] + vk_ic: Vec>, + } + + impl<'de> Deserialize<'de> for Proof { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let json = ProofJson::deserialize(deserializer)?; + Proof::try_from(json).map_err(serde::de::Error::custom) + } + } + + impl Serialize for Proof { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let json = self.to_json().map_err(serde::ser::Error::custom)?; + json.serialize(serializer) + } + } + + impl TryFrom for Proof { + type Error = Error; + + fn try_from(json: ProofJson) -> Result { + Ok(Proof { + pi_a: convert_g1(&json.pi_a)?, + pi_b: convert_g2(&json.pi_b)?, + pi_c: convert_g1(&json.pi_c)?, + }) + } + } + + impl Proof { + fn to_json(&self) -> Result { + Ok(ProofJson { + pi_a: export_g1(&self.pi_a), + pi_b: export_g2(&self.pi_b), + pi_c: export_g1(&self.pi_c), + protocol: "groth16".to_string(), + curve: "bn128".to_string(), + }) + } + + pub fn to_bytes(&self) -> [u8; 256] { + let mut bytes = [0u8; 256]; + bytes[..64].copy_from_slice(&self.pi_a); + bytes[64..192].copy_from_slice(&self.pi_b); + bytes[192..].copy_from_slice(&self.pi_c); + bytes + } + } + + fn export_g1(bytes: &[u8; G1_LEN]) -> Vec { + let x = BigUint::from_bytes_be(&bytes[..32]); + let y = BigUint::from_bytes_be(&bytes[32..]); + vec![x.to_string(), y.to_string(), "1".to_string()] + } + + fn export_g2(bytes: &[u8; G2_LEN]) -> Vec> { + let x_c1 = BigUint::from_bytes_be(&bytes[..32]); + let x_c0 = BigUint::from_bytes_be(&bytes[32..64]); + let y_c1 = BigUint::from_bytes_be(&bytes[64..96]); + let y_c0 = BigUint::from_bytes_be(&bytes[96..]); + vec![ + vec![x_c0.to_string(), x_c1.to_string()], + vec![y_c0.to_string(), y_c1.to_string()], + vec!["1".to_string(), "0".to_string()], + ] + } + + pub(crate) fn convert_g1(values: &[String]) -> Result<[u8; G1_LEN]> { + if values.len() != 3 { + return Err(anyhow!( + "Invalid G1 point: expected 3 values, got {}", + values.len() + )); + } + + let x = BigUint::parse_bytes(values[0].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G1 x coordinate"))?; + let y = BigUint::parse_bytes(values[1].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G1 y coordinate"))?; + let z = BigUint::parse_bytes(values[2].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G1 z coordinate"))?; + + // check that z == 1 + if z != BigUint::from(1u8) { + return Err(anyhow!( + "Invalid G1 point: Z coordinate is not 1 (found {})", + z + )); + } + + let mut result = [0u8; G1_LEN]; + let x_bytes = x.to_bytes_be(); + let y_bytes = y.to_bytes_be(); + + result[32 - x_bytes.len()..32].copy_from_slice(&x_bytes); + result[G1_LEN - y_bytes.len()..].copy_from_slice(&y_bytes); + + Ok(result) + } + + pub(crate) fn convert_g2(values: &[Vec]) -> Result<[u8; G2_LEN]> { + if values.len() != 3 || values[0].len() != 2 || values[1].len() != 2 || values[2].len() != 2 + { + return Err(anyhow!("Invalid G2 point structure")); + } + + let x_c0 = BigUint::parse_bytes(values[0][0].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 x.c0"))?; + let x_c1 = BigUint::parse_bytes(values[0][1].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 x.c1"))?; + let y_c0 = BigUint::parse_bytes(values[1][0].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 y.c0"))?; + let y_c1 = BigUint::parse_bytes(values[1][1].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 y.c1"))?; + + // check z == [1, 0] + let z_c0 = BigUint::parse_bytes(values[2][0].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 z.c0"))?; + let z_c1 = BigUint::parse_bytes(values[2][1].as_bytes(), 10) + .ok_or_else(|| anyhow!("Failed to parse G2 z.c1"))?; + + if z_c0 != BigUint::from(1u8) || z_c1 != BigUint::from(0u8) { + return Err(anyhow!( + "Invalid G2 point: Z coordinate is not [1, 0] (found [{}, {}])", + z_c0, + z_c1 + )); + } + + let mut result = [0u8; G2_LEN]; + let x_c1_bytes = x_c1.to_bytes_be(); + let x_c0_bytes = x_c0.to_bytes_be(); + let y_c1_bytes = y_c1.to_bytes_be(); + let y_c0_bytes = y_c0.to_bytes_be(); + + result[32 - x_c1_bytes.len()..32].copy_from_slice(&x_c1_bytes); + result[64 - x_c0_bytes.len()..64].copy_from_slice(&x_c0_bytes); + result[96 - y_c1_bytes.len()..96].copy_from_slice(&y_c1_bytes); + result[G2_LEN - y_c0_bytes.len()..].copy_from_slice(&y_c0_bytes); + + Ok(result) + } pub fn negate_g1(point: &[u8; 64]) -> Result<[u8; 64], ()> { let x = &point[..32]; @@ -260,4 +438,248 @@ pub mod client { proof.pi_a = negate_g1(&proof.pi_a)?; Ok(proof) } + + pub fn write_to_file(filename: &str, proof: &Proof) { + let mut file = File::create(filename).expect("Failed to create file"); + file.write_all(&proof.pi_a) + .expect("Failed to write proof_a"); + file.write_all(&proof.pi_b) + .expect("Failed to write proof_b"); + file.write_all(&proof.pi_c) + .expect("Failed to write proof_c"); + } + + pub fn write_compressed_proof_to_file(filename: &str, proof: &[u8]) { + let mut file = File::create(filename).expect("Failed to create file"); + file.write_all(proof).expect("Failed to write proof"); + } + + pub fn compress_g1_be(g1: &[u8; 64]) -> [u8; 32] { + let g1 = convert_endianness::<32, 64>(g1); + let mut compressed = [0u8; 32]; + let g1 = G1::deserialize_with_mode(g1.as_slice(), Compress::No, Validate::Yes).unwrap(); + G1::serialize_with_mode(&g1, &mut compressed[..], Compress::Yes).unwrap(); + convert_endianness::<32, 32>(&compressed) + } + + pub fn compress_g2_be(g2: &[u8; 128]) -> [u8; 64] { + let g2: [u8; 128] = convert_endianness::<64, 128>(g2); + let mut compressed = [0u8; 64]; + let g2 = G2::deserialize_with_mode(g2.as_slice(), Compress::No, Validate::Yes).unwrap(); + G2::serialize_with_mode(&g2, &mut compressed[..], Compress::Yes).unwrap(); + convert_endianness::<64, 64>(&compressed) + } +} + +#[cfg(test)] +mod test_lib { + use super::client::*; + use super::*; + use risc0_zkvm::sha::Digestible; + use risc0_zkvm::Receipt; + use std::fs::File; + use std::io::Write; + use vk::*; + + // From: https://github.com/risc0/risc0/blob/v1.1.1/risc0/circuit/recursion/src/control_id.rs#L47 + const ALLOWED_CONTROL_ROOT: &str = + "8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e"; + const BN254_IDENTITY_CONTROL_ID: &str = + "4e160df1e119ac0e3d658755a9edf38c8feb307b34bc10b57f4538dbe122a005"; + + // Reference base field modulus for BN254 + // https://docs.rs/ark-bn254/latest/ark_bn254/ + const REF_BASE_FIELD_MODULUS: &str = + "21888242871839275222246405745257275088696311157297823662689037894645226208583"; + + fn load_receipt_and_extract_data() -> (Receipt, Proof, PublicInputs<5>) { + let receipt_json_str = include_bytes!("../test/data/receipt.json"); + let receipt: Receipt = serde_json::from_slice(receipt_json_str).unwrap(); + + let claim_digest = receipt + .inner + .groth16() + .unwrap() + .claim + .digest() + .try_into() + .unwrap(); + let public_inputs = public_inputs( + claim_digest, + ALLOWED_CONTROL_ROOT, + BN254_IDENTITY_CONTROL_ID, + ) + .unwrap(); + + let proof_raw = &receipt.inner.groth16().unwrap().seal; + let mut proof = Proof { + pi_a: proof_raw[0..64].try_into().unwrap(), + pi_b: proof_raw[64..192].try_into().unwrap(), + pi_c: proof_raw[192..256].try_into().unwrap(), + }; + proof.pi_a = negate_g1(&proof.pi_a).unwrap(); + + (receipt, proof, public_inputs) + } + + fn load_verification_key() -> VerificationKey { + return vk::VERIFICATION_KEY; + } + + #[test] + fn test_convert_g1_invalid_z() { + let values = vec![ + "1".to_string(), // x + "2".to_string(), // y + "0".to_string(), // z (invalid) + ]; + + let result = convert_g1(&values); + + assert!( + result.is_err(), + "Expected error due to invalid Z coordinate" + ); + assert_eq!( + result.unwrap_err().to_string(), + "Invalid G1 point: Z coordinate is not 1 (found 0)" + ); + } + + #[test] + fn test_convert_g2_invalid_z() { + let values = vec![ + vec!["1".to_string(), "2".to_string()], // x + vec!["3".to_string(), "4".to_string()], // y + vec!["0".to_string(), "0".to_string()], // z (invalid) + ]; + + let result = convert_g2(&values); + + assert!( + result.is_err(), + "Expected error due to invalid Z coordinate" + ); + assert_eq!( + result.unwrap_err().to_string(), + "Invalid G2 point: Z coordinate is not [1, 0] (found [0, 0])" + ); + } + + #[test] + fn test_proof() { + let (_, proof, _) = load_receipt_and_extract_data(); + println!("{:?}", proof); + + // Convert to bytes + let proof_bytes = proof.to_bytes(); + + println!("PROOF: {:?}", proof_bytes); + + // Check that we have 256 bytes + assert_eq!(proof_bytes.len(), 256); + + // Test roundtrip + let exported_json = serde_json::to_string(&proof).unwrap(); + let reimported_proof: Proof = serde_json::from_str(&exported_json).unwrap(); + assert_eq!(proof, reimported_proof, "Proof roundtrip failed"); + + println!("Proof bytes: {:?}", proof_bytes); + } + + #[test] + pub fn test_verify() { + let (_, proof, public_inputs) = load_receipt_and_extract_data(); + let vk = load_verification_key(); + let res = verify_groth_proof(&proof, &public_inputs); + assert!(res.is_ok(), "Verification failed"); + } + + #[test] + fn test_write_compressed_proof_to_file() { + let (_, proof, _) = load_receipt_and_extract_data(); + + let compressed_proof_a = compress_g1_be(&proof.pi_a); + let compressed_proof_b = compress_g2_be(&proof.pi_b); + let compressed_proof_c = compress_g1_be(&proof.pi_c); + + let compressed_proof = [ + compressed_proof_a.as_slice(), + compressed_proof_b.as_slice(), + compressed_proof_c.as_slice(), + ] + .concat(); + + write_compressed_proof_to_file("test/data/compressed_proof.bin", &compressed_proof); + } + + #[test] + fn write_claim_digest_to_file() { + let claim_digest = get_claim_digest(); + + let output_path = "test/data/claim_digest.bin"; + + let mut file = File::create(output_path).expect("Failed to create file"); + file.write_all(&claim_digest) + .expect("Failed to write claim digest to file"); + + println!("Raw claim digest written to {:?}", output_path); + + // Verify the file was written correctly + let read_digest = std::fs::read(output_path).expect("Failed to read claim digest file"); + assert_eq!( + claim_digest.to_vec(), + read_digest, + "Written and read claim digests do not match" + ); + } + + fn get_claim_digest() -> [u8; 32] { + let receipt_json_str = include_bytes!("../test/data/receipt.json"); + let receipt: Receipt = serde_json::from_slice(receipt_json_str).unwrap(); + receipt + .inner + .groth16() + .unwrap() + .claim + .digest() + .try_into() + .unwrap() + } + + #[test] + fn test_scalar_validity_check() { + let valid_scalar = [0u8; 32]; + assert!(is_scalar_valid(&valid_scalar), "Zero should be valid"); + + let mut invalid_scalar = BASE_FIELD_MODULUS_Q; + assert!(!is_scalar_valid(&invalid_scalar), "q should be invalid"); + + invalid_scalar[31] += 1; + assert!(!is_scalar_valid(&invalid_scalar), "q+1 should be invalid"); + + let mut below_q = BASE_FIELD_MODULUS_Q; + below_q[31] -= 1; + assert!(is_scalar_valid(&below_q), "q-1 should be valid"); + } + + #[test] + fn test_base_field_modulus_against_reference() { + use num_bigint::BigUint; + + let ref_base_field_modulus = BigUint::parse_bytes(REF_BASE_FIELD_MODULUS.as_bytes(), 10) + .expect("Failed to parse BASE_FIELD_MODULUS"); + + let ref_base_field_modulus_hex = format!("{:X}", ref_base_field_modulus); + + let field_modulus_q_hex: String = BASE_FIELD_MODULUS_Q + .iter() + .map(|b| format!("{:02X}", b)) + .collect(); + + assert_eq!( + field_modulus_q_hex, ref_base_field_modulus_hex, + "FIELD_MODULUS_Q does not match reference REF_BASE_FIELD_MODULUS" + ); + } } diff --git a/solana-verifier/programs/groth_16_verifier/src/vk.rs b/solana-verifier/programs/groth_16_verifier/src/vk.rs index 5d88605..3d2bc93 100644 --- a/solana-verifier/programs/groth_16_verifier/src/vk.rs +++ b/solana-verifier/programs/groth_16_verifier/src/vk.rs @@ -1,9 +1,9 @@ use anchor_lang::prelude::*; use anchor_lang::{AnchorDeserialize, AnchorSerialize}; -const G1_LEN: usize = 64; -const G2_LEN: usize = 128; -const IC_LEN: usize = 6; +pub const G1_LEN: usize = 64; +pub const G2_LEN: usize = 128; +pub const IC_LEN: usize = 6; #[derive(Debug, Clone, PartialEq, Eq, AnchorDeserialize, AnchorSerialize)] pub struct VerificationKey { diff --git a/solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin b/solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin new file mode 100644 index 0000000..d438c4f --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/test/data/claim_digest.bin @@ -0,0 +1 @@ +‹á) {aó'ìÇÊ<ÖPÿ-–‚‹*áV!µ \ No newline at end of file diff --git a/solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin b/solana-verifier/programs/groth_16_verifier/test/data/compressed_proof.bin new file mode 100644 index 0000000000000000000000000000000000000000..d045ef308b23ae845a68e1b1a5db501716a347d8 GIT binary patch literal 128 zcmV-`0Du3I$13CP4yS9^83rSyi|ZWywwpbXS`6kZpJxhtPi+7d5BdAufBJYBh<-m) zaQ(}(4a0XQ$&_Jkm+_XJ@ZS9|dQ-KQHCydNzy3LzaxAUg+@bG3)UYdXyK(mPo iW7c{hx7@&jyBZ^}#l6{L^f8;yB;1BbYoapb7FxfzKtt~U literal 0 HcmV?d00001 diff --git a/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json new file mode 100644 index 0000000..577eaa8 --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/test/data/r0_test_vk.json @@ -0,0 +1,84 @@ +{ + "protocol": "groth16", + "curve": "bn128", + "nPublic": 5, + "vk_alpha_1": [ + "20491192805390485299153009773594534940189261866228447918068658471970481763042", + "9383485363053290200918347156157836566562967994039712273449902621266178545958", + "1" + ], + "vk_beta_2": [ + [ + "6375614351688725206403948262868962793625744043794305715222011528459656738731", + "4252822878758300859123897981450591353533073413197771768651442665752259397132" + ], + [ + "10505242626370262277552901082094356697409835680220590971873171140371331206856", + "21847035105528745403288232691147584728191162732299865338377159692350059136679" + ], + [ + "1", + "0" + ] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + [ + "1", + "0" + ] + ], + "vk_delta_2": [ + [ + "12043754404802191763554326994664886008979042643626290185762540825416902247219", + "1668323501672964604911431804142266013250380587483576094566949227275849579036" + ], + [ + "13740680757317479711909903993315946540841369848973133181051452051592786724563", + "7710631539206257456743780535472368339139328733484942210876916214502466455394" + ], + [ + "1", + "0" + ] + ], + "IC": [ + [ + "8446592859352799428420270221449902464741693648963397251242447530457567083492", + "1064796367193003797175961162477173481551615790032213185848276823815288302804", + "1" + ], + [ + "3179835575189816632597428042194253779818690147323192973511715175294048485951", + "20895841676865356752879376687052266198216014795822152491318012491767775979074", + "1" + ], + [ + "5332723250224941161709478398807683311971555792614491788690328996478511465287", + "21199491073419440416471372042641226693637837098357067793586556692319371762571", + "1" + ], + [ + "12457994489566736295787256452575216703923664299075106359829199968023158780583", + "19706766271952591897761291684837117091856807401404423804318744964752784280790", + "1" + ], + [ + "19617808913178163826953378459323299110911217259216006187355745713323154132237", + "21663537384585072695701846972542344484111393047775983928357046779215877070466", + "1" + ], + [ + "6834578911681792552110317589222010969491336870276623105249474534788043166867", + "15060583660288623605191393599883223885678013570733629274538391874953353488393", + "1" + ] + ] +} \ No newline at end of file diff --git a/solana-verifier/programs/groth_16_verifier/test/data/receipt.json b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json new file mode 100644 index 0000000..51d49e8 --- /dev/null +++ b/solana-verifier/programs/groth_16_verifier/test/data/receipt.json @@ -0,0 +1 @@ +{"inner":{"Groth16":{"seal":[18,199,42,227,237,14,167,107,215,25,6,35,164,139,235,28,253,182,155,61,145,90,12,230,43,159,103,10,123,79,109,0,1,236,69,103,95,153,253,99,157,27,32,247,1,35,212,131,146,22,49,99,35,153,243,81,234,19,140,84,237,221,208,250,21,15,249,251,221,127,250,120,24,136,126,63,83,112,253,203,179,13,195,119,39,201,148,97,110,151,241,150,157,240,222,253,47,122,83,181,150,53,91,237,67,191,254,57,154,114,44,173,221,220,161,239,63,212,180,122,116,234,157,211,53,64,179,137,16,95,31,49,232,147,239,45,8,129,139,171,214,9,185,109,144,239,225,224,20,102,45,237,57,49,253,88,180,30,25,78,40,134,115,250,77,255,75,45,123,90,169,188,127,67,69,147,23,186,216,139,188,179,106,186,34,222,232,214,124,3,166,101,10,99,214,122,33,183,220,192,130,187,26,35,175,197,189,217,98,244,49,155,207,36,220,134,72,107,162,50,228,22,90,191,3,251,182,141,20,55,85,188,51,89,196,185,98,253,35,75,121,175,140,251,58,175,162,21,32,77,211,137,214,155,141,114],"claim":{"Value":{"pre":{"Value":{"pc":2105720,"merkle_root":[4224411480,845866751,2644154475,3950497875,173122336,1840638066,2988445566,2047025840]}},"post":{"Value":{"pc":0,"merkle_root":[0,0,0,0,0,0,0,0]}},"exit_code":{"Halted":0},"input":{"Pruned":[0,0,0,0,0,0,0,0]},"output":{"Value":{"journal":{"Value":[1,0,0,120]},"assumptions":{"Value":[]}}}}},"verifier_parameters":[1763163472,2876521993,3272685530,2018367509,394453731,2734973759,718893618,4111358395]}},"journal":{"bytes":[1,0,0,120]},"metadata":{"verifier_parameters":[1763163472,2876521993,3272685530,2018367509,394453731,2734973759,718893618,4111358395]}} \ No newline at end of file From 876fd8c5ea8b5459a9c2d383ff6897a9a008fc05 Mon Sep 17 00:00:00 2001 From: Brandon Anderson Date: Thu, 9 Jan 2025 15:10:27 -0700 Subject: [PATCH 21/21] Added a comment in the CPI call for emergency_stop_with_proof --- solana-verifier/programs/verifier_router/src/estop/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solana-verifier/programs/verifier_router/src/estop/mod.rs b/solana-verifier/programs/verifier_router/src/estop/mod.rs index 53929d1..d55a7fc 100644 --- a/solana-verifier/programs/verifier_router/src/estop/mod.rs +++ b/solana-verifier/programs/verifier_router/src/estop/mod.rs @@ -217,6 +217,12 @@ pub fn emergency_stop_with_proof( }; let verify_ctx = CpiContext::new(verifier_program, verifier_accounts); + + // We ignore the result because in solana Invoke will fail the transaction for any non-success result. + // See https://docs.rs/solana-cpi/latest/solana_cpi/fn.invoke.html specifically: + // + // > This function will not return if the called program returns anything other than success. + // > If the callee returns an error or aborts then the entire transaction will immediately fail. let _ = groth_16_verifier::cpi::verify(verify_ctx, proof, zero_array, zero_array); close_verifier(