diff --git a/.circleci/config.yml b/.circleci/config.yml index e9a368e19..ad5133910 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,7 +99,7 @@ jobs: - run: working_directory: create-leo-app/template-node command: | - yarn start + yarn dev template-node-ts: executor: rust-node @@ -108,7 +108,7 @@ jobs: - run: working_directory: create-leo-app/template-node-ts command: | - yarn start + yarn dev template-extension: executor: rust-node diff --git a/create-leo-app/template-node-ts/package.json b/create-leo-app/template-node-ts/package.json index be36c97a3..6c3e3df2f 100644 --- a/create-leo-app/template-node-ts/package.json +++ b/create-leo-app/template-node-ts/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "build": "rimraf dist/js && rollup --config", - "start": "npm run build && node dist/index.js" + "dev": "npm run build && node dist/index.js" }, "dependencies": { "@provablehq/sdk": "^0.7.0" diff --git a/create-leo-app/template-node/package.json b/create-leo-app/template-node/package.json index 0334fe2ba..a37b987a9 100644 --- a/create-leo-app/template-node/package.json +++ b/create-leo-app/template-node/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "start": "node index.js" + "dev": "node index.js" }, "dependencies": { "@provablehq/sdk": "^0.7.0" diff --git a/create-leo-app/template-offline-public-transaction-ts/package.json b/create-leo-app/template-offline-public-transaction-ts/package.json index 7d836216e..663095c84 100644 --- a/create-leo-app/template-offline-public-transaction-ts/package.json +++ b/create-leo-app/template-offline-public-transaction-ts/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "build": "rimraf dist/js && rollup --config", - "start": "npm run build && node dist/index.js" + "dev": "npm run build && node dist/index.js" }, "dependencies": { "@provablehq/sdk": "^0.7.0" diff --git a/sdk/package.json b/sdk/package.json index bebc2b24a..85d1c814a 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -47,10 +47,11 @@ }, "homepage": "https://github.com/ProvableHQ/sdk#readme", "dependencies": { - "@provablehq/wasm": "^0.7.0", + "@provablehq/wasm": "^0.7.2", "comlink": "^4.4.1", "mime": "^3.0.0", - "sync-request": "^6.1.0" + "sync-request": "^6.1.0", + "core-js": "^3.38.1" }, "devDependencies": { "@rollup/plugin-replace": "^5.0.5", @@ -63,7 +64,6 @@ "better-docs": "^2.7.2", "chai": "^5.1.1", "clean-jsdoc-theme": "^4.1.8", - "core-js": "^3.38.1", "cpr": "^3.0.1", "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", diff --git a/sdk/src/browser.ts b/sdk/src/browser.ts index 6bff23642..a08d250ec 100644 --- a/sdk/src/browser.ts +++ b/sdk/src/browser.ts @@ -2,12 +2,20 @@ import "./polyfill/shared"; import { Account } from "./account"; import { AleoNetworkClient, ProgramImports } from "./network-client"; -import { Block } from "./models/block"; -import { Execution } from "./models/execution"; -import { Input } from "./models/input"; -import { Output } from "./models/output"; -import { TransactionModel } from "./models/transactionModel"; -import { Transition } from "./models/transition"; +import { BlockJSON } from "./models/blockJSON"; +import { ExecutionJSON } from "./models/executionJSON"; +import { FunctionObject } from "./models/functionObject"; +import { InputJSON } from "./models/input/inputJSON"; +import { InputObject } from "./models/input/inputObject"; +import { OutputJSON } from "./models/output/outputJSON"; +import { OutputObject } from "./models/output/outputObject"; +import { PlaintextArray} from "./models/plaintext/array"; +import { PlaintextLiteral} from "./models/plaintext/literal"; +import { PlaintextStruct} from "./models/plaintext/struct"; +import { TransactionJSON } from "./models/transaction/transactionJSON"; +import { TransactionSummary } from "./models/transaction/transactionSummary"; +import { TransitionJSON } from "./models/transition/transitionJSON"; +import { TransitionObject } from "./models/transition/transitionObject"; import { AleoKeyProvider, AleoKeyProviderParams, @@ -41,10 +49,13 @@ export { logAndThrow } from "./utils"; export { Address, + Ciphertext, Execution as FunctionExecution, ExecutionResponse, Field, + Group, OfflineQuery, + Plaintext, PrivateKey, PrivateKeyCiphertext, Program, @@ -53,7 +64,9 @@ export { RecordCiphertext, RecordPlaintext, Signature, + Scalar, Transaction, + Transition, VerifyingKey, ViewKey, initThreadPool, @@ -81,21 +94,27 @@ export { AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, - Block, + BlockJSON, BlockHeightSearch, CachedKeyPair, - Execution, + ExecutionJSON, + FunctionObject, FunctionKeyPair, FunctionKeyProvider, - Input, + InputJSON, + InputObject, KeySearchParams, NetworkRecordProvider, ProgramImports, OfflineKeyProvider, OfflineSearchParams, - Output, + PlaintextArray, + PlaintextLiteral, + PlaintextStruct, + OutputJSON, + OutputObject, RecordProvider, RecordSearchParams, - TransactionModel, - Transition, + TransactionJSON, + TransactionSummary, }; diff --git a/sdk/src/models/block.ts b/sdk/src/models/blockJSON.ts similarity index 94% rename from sdk/src/models/block.ts rename to sdk/src/models/blockJSON.ts index 5f9775c5a..77b6ffd1f 100644 --- a/sdk/src/models/block.ts +++ b/sdk/src/models/blockJSON.ts @@ -1,6 +1,6 @@ import { ConfirmedTransaction } from "./confirmed_transaction"; -export type Block = { +export type BlockJSON = { block_hash: string; previous_hash: string; header: Header; diff --git a/sdk/src/models/confirmed_transaction.ts b/sdk/src/models/confirmed_transaction.ts index d4ad953af..a2546a775 100644 --- a/sdk/src/models/confirmed_transaction.ts +++ b/sdk/src/models/confirmed_transaction.ts @@ -1,7 +1,7 @@ -import { TransactionModel } from "./transactionModel"; +import { TransactionJSON } from "./transaction/transactionJSON"; export type ConfirmedTransaction = { type: string; id: string; - transaction: TransactionModel; + transaction: TransactionJSON; } diff --git a/sdk/src/models/deploy.ts b/sdk/src/models/deploy.ts new file mode 100644 index 000000000..00229966e --- /dev/null +++ b/sdk/src/models/deploy.ts @@ -0,0 +1,6 @@ +import { FunctionObject } from "./functionObject"; + +export type DeploymentMetadata = { + "programId" : string, + "functions" : FunctionObject[] +} \ No newline at end of file diff --git a/sdk/src/models/execution.ts b/sdk/src/models/execution.ts deleted file mode 100644 index adf87ff4c..000000000 --- a/sdk/src/models/execution.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Transition } from "./transition"; - -export type Execution = { - edition: number; - transitions?: (Transition)[]; -} diff --git a/sdk/src/models/executionJSON.ts b/sdk/src/models/executionJSON.ts new file mode 100644 index 000000000..ce8f5bdf3 --- /dev/null +++ b/sdk/src/models/executionJSON.ts @@ -0,0 +1,6 @@ +import { TransitionJSON } from "./transition/transitionJSON"; + +export type ExecutionJSON = { + edition: number; + transitions?: (TransitionJSON)[]; +} diff --git a/sdk/src/models/functionObject.ts b/sdk/src/models/functionObject.ts new file mode 100644 index 000000000..a6f0e232a --- /dev/null +++ b/sdk/src/models/functionObject.ts @@ -0,0 +1,8 @@ +import { VerifyingKey } from "@provablehq/wasm"; + +export type FunctionObject = { + "name" : string, + "constraints" : number, + "variables" : number, + "verifyingKey" : string | VerifyingKey, +} \ No newline at end of file diff --git a/sdk/src/models/input.ts b/sdk/src/models/input/inputJSON.ts similarity index 56% rename from sdk/src/models/input.ts rename to sdk/src/models/input/inputJSON.ts index 77f12dacb..a98107ffa 100644 --- a/sdk/src/models/input.ts +++ b/sdk/src/models/input/inputJSON.ts @@ -1,4 +1,7 @@ -export type Input = { +/** + * Object representation of an Input as raw JSON returned from a SnarkOS node. + */ +export type InputJSON = { type: string; id: string; tag?: string; diff --git a/sdk/src/models/input/inputObject.ts b/sdk/src/models/input/inputObject.ts new file mode 100644 index 000000000..8ad9c3080 --- /dev/null +++ b/sdk/src/models/input/inputObject.ts @@ -0,0 +1,16 @@ +/** + * Aleo function Input represented as a typed typescript object. + */ +import { Ciphertext, Field } from "@provablehq/wasm"; +import { Plaintext } from "@provablehq/wasm/mainnet.js"; +import { PlaintextObject } from "../plaintext/plaintext"; + +/** + * Object representation of an Input as raw JSON returned from a SnarkOS node. + */ +export type InputObject = { + type: "string", + id: "string" | Field, + tag?: string | Field, + value?: Ciphertext | Plaintext | PlaintextObject, +} \ No newline at end of file diff --git a/sdk/src/models/output.ts b/sdk/src/models/output/outputJSON.ts similarity index 74% rename from sdk/src/models/output.ts rename to sdk/src/models/output/outputJSON.ts index df7161984..abf2acfed 100644 --- a/sdk/src/models/output.ts +++ b/sdk/src/models/output/outputJSON.ts @@ -1,4 +1,4 @@ -export type Output = { +export type OutputJSON = { type: string; id: string; checksum: string; diff --git a/sdk/src/models/output/outputObject.ts b/sdk/src/models/output/outputObject.ts new file mode 100644 index 000000000..edded8da4 --- /dev/null +++ b/sdk/src/models/output/outputObject.ts @@ -0,0 +1,18 @@ +/** + * Aleo function Input represented as a typed typescript object. + */ +import { Field, Ciphertext, Plaintext } from "@provablehq/wasm"; +import { PlaintextObject } from "../plaintext/plaintext"; + +/** + * Object representation of an Input as raw JSON returned from a SnarkOS node. + */ +export type OutputObject = { + type: string, + id: string | Field, + value?: Ciphertext | Plaintext | PlaintextObject, + checksum?: string | Field, + programId?: string, + functionName?: string, + arguments?: Array | Array<OutputObject> +} \ No newline at end of file diff --git a/sdk/src/models/plaintext/array.ts b/sdk/src/models/plaintext/array.ts new file mode 100644 index 000000000..00628103c --- /dev/null +++ b/sdk/src/models/plaintext/array.ts @@ -0,0 +1,4 @@ +import { PlaintextLiteral } from "./literal"; +import { PlaintextStruct } from "./struct"; + +export type PlaintextArray = PlaintextLiteral[] | PlaintextStruct[] | PlaintextArray[]; \ No newline at end of file diff --git a/sdk/src/models/plaintext/literal.ts b/sdk/src/models/plaintext/literal.ts new file mode 100644 index 000000000..d1ebd875f --- /dev/null +++ b/sdk/src/models/plaintext/literal.ts @@ -0,0 +1 @@ +export type PlaintextLiteral = boolean | bigint | number | string; \ No newline at end of file diff --git a/sdk/src/models/plaintext/plaintext.ts b/sdk/src/models/plaintext/plaintext.ts new file mode 100644 index 000000000..103382af3 --- /dev/null +++ b/sdk/src/models/plaintext/plaintext.ts @@ -0,0 +1,5 @@ +import { PlaintextArray } from "./array"; +import { PlaintextLiteral } from "./literal"; +import { PlaintextStruct } from "./struct"; + +export type PlaintextObject = PlaintextArray| PlaintextLiteral | PlaintextStruct \ No newline at end of file diff --git a/sdk/src/models/plaintext/struct.ts b/sdk/src/models/plaintext/struct.ts new file mode 100644 index 000000000..91dad63f5 --- /dev/null +++ b/sdk/src/models/plaintext/struct.ts @@ -0,0 +1,6 @@ +import { PlaintextArray } from "./array"; +import { PlaintextLiteral } from "./literal"; + +export type PlaintextStruct = { + [key: string]: PlaintextArray | PlaintextLiteral | PlaintextStruct; +} \ No newline at end of file diff --git a/sdk/src/models/transaction/transactionJSON.ts b/sdk/src/models/transaction/transactionJSON.ts new file mode 100644 index 000000000..57f75df2a --- /dev/null +++ b/sdk/src/models/transaction/transactionJSON.ts @@ -0,0 +1,7 @@ +import { ExecutionJSON } from "../executionJSON"; + +export type TransactionJSON = { + type: string; + id: string; + execution: ExecutionJSON; +} diff --git a/sdk/src/models/transaction/transactionSummary.ts b/sdk/src/models/transaction/transactionSummary.ts new file mode 100644 index 000000000..9aecbef56 --- /dev/null +++ b/sdk/src/models/transaction/transactionSummary.ts @@ -0,0 +1,12 @@ +import { TransitionObject } from "../transition/transitionObject"; +import { DeploymentMetadata } from "../deploy"; + +export type TransactionSummary = { + id : string; + type : string; + fee : bigint; + baseFee : bigint; + priorityFee : bigint; + transitions : TransitionObject[]; + deployment?: DeploymentMetadata; +} diff --git a/sdk/src/models/transactionModel.ts b/sdk/src/models/transactionModel.ts deleted file mode 100644 index 33135f67d..000000000 --- a/sdk/src/models/transactionModel.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Execution } from "./execution"; - -export type TransactionModel = { - type: string; - id: string; - execution: Execution; -} diff --git a/sdk/src/models/transition.ts b/sdk/src/models/transition.ts deleted file mode 100644 index 97ceda887..000000000 --- a/sdk/src/models/transition.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Input } from "./input"; -import { Output } from "./output"; - -export type Transition = { - id: string; - program: string; - function: string; - inputs?: (Input)[]; - outputs?: (Output)[]; - proof: string; - tpk: string; - tcm: string; - fee: number; -} diff --git a/sdk/src/models/transition/transitionJSON.ts b/sdk/src/models/transition/transitionJSON.ts new file mode 100644 index 000000000..a279ddbd8 --- /dev/null +++ b/sdk/src/models/transition/transitionJSON.ts @@ -0,0 +1,14 @@ +import { InputJSON } from "../input/inputJSON"; +import { OutputJSON } from "../output/outputJSON"; + +export type TransitionJSON = { + id: string; + program: string; + function: string; + inputs?: (InputJSON)[]; + outputs?: (OutputJSON)[]; + proof: string; + tpk: string; + tcm: string; + fee: bigint; +} \ No newline at end of file diff --git a/sdk/src/models/transition/transitionObject.ts b/sdk/src/models/transition/transitionObject.ts new file mode 100644 index 000000000..88b4061f0 --- /dev/null +++ b/sdk/src/models/transition/transitionObject.ts @@ -0,0 +1,16 @@ +import { InputObject } from "../input/inputObject"; +import { OutputObject } from "../output/outputObject"; +import { Field, Group } from "@provablehq/wasm"; + +export type TransitionObject = { + id: string; + program: string; + functionName: string; + inputs?: (InputObject)[]; + outputs?: (OutputObject)[]; + proof: string; + tpk: string | Group; + tcm: string | Field; + scm: string | Field; + fee: bigint; +} \ No newline at end of file diff --git a/sdk/src/network-client.ts b/sdk/src/network-client.ts index 39b6515e2..f88cea543 100644 --- a/sdk/src/network-client.ts +++ b/sdk/src/network-client.ts @@ -1,8 +1,9 @@ import { get, post, parseJSON, logAndThrow } from "./utils"; import { Account } from "./account"; -import { Block } from "./models/block"; -import { TransactionModel } from "./models/transactionModel"; +import { BlockJSON } from "./models/blockJSON"; +import { TransactionJSON } from "./models/transaction/transactionJSON"; import { + Plaintext, RecordCiphertext, Program, RecordPlaintext, @@ -96,7 +97,7 @@ class AleoNetworkClient { } /** - * Attempts to find unspent records in the Aleo blockchain for a specified private key + * Attempts to find unspent records in the Aleo blockchain for a specified private key. * @param {number} startHeight - The height at which to start searching for unspent records * @param {number} endHeight - The height at which to stop searching for unspent records * @param {string | PrivateKey} privateKey - The private key to use to find unspent records @@ -291,15 +292,15 @@ class AleoNetworkClient { } /** - * Returns the contents of the block at the specified block height + * Returns the contents of the block at the specified block height. * * @param {number} height * @example * const block = networkClient.getBlock(1234); */ - async getBlock(height: number): Promise<Block> { + async getBlock(height: number): Promise<BlockJSON> { try { - const block = await this.fetchData<Block>("/block/" + height); + const block = await this.fetchData<BlockJSON>("/block/" + height); return block; } catch (error) { throw new Error("Error fetching block."); @@ -307,16 +308,16 @@ class AleoNetworkClient { } /** - * Returns a range of blocks between the specified block heights + * Returns a range of blocks between the specified block heights. * * @param {number} start * @param {number} end * @example * const blockRange = networkClient.getBlockRange(2050, 2100); */ - async getBlockRange(start: number, end: number): Promise<Array<Block>> { + async getBlockRange(start: number, end: number): Promise<Array<BlockJSON>> { try { - return await this.fetchData<Array<Block>>("/blocks?start=" + start + "&end=" + end); + return await this.fetchData<Array<BlockJSON>>("/blocks?start=" + start + "&end=" + end); } catch (error) { const errorMessage = `Error fetching blocks between ${start} and ${end}.`; throw new Error(errorMessage); @@ -324,10 +325,10 @@ class AleoNetworkClient { } /** - * Returns the deployment transaction id associated with the specified program + * Returns the deployment transaction id associated with the specified program. * * @param {Program | string} program - * @returns {TransactionModel} + * @returns {TransactionJSON} */ async getDeploymentTransactionIDForProgram(program: Program | string): Promise<string> { if (program instanceof Program) { @@ -342,36 +343,51 @@ class AleoNetworkClient { } /** - * Returns the deployment transaction associated with a specified program + * Returns the deployment transaction associated with a specified program. * * @param {Program | string} program - * @returns {TransactionModel} + * @returns {TransactionJSON} */ - async getDeploymentTransactionForProgram(program: Program | string): Promise<TransactionModel> { + async getDeploymentTransactionForProgram(program: Program | string): Promise<TransactionJSON> { try { const transaction_id = <string>await this.getDeploymentTransactionIDForProgram(program); - return <TransactionModel>await this.getTransaction(transaction_id); + return <TransactionJSON>await this.getTransaction(transaction_id); } catch (error) { throw new Error("Error fetching deployment transaction for program."); } } /** - * Returns the contents of the latest block + * Returns the deployment transaction associated with a specified program as a wasm object. + * + * @param {Program | string} program + * @returns {TransactionJSON} + */ + async getDeploymentTransactioObjectnForProgram(program: Program | string): Promise<Transaction> { + try { + const transaction_id = <string>await this.getDeploymentTransactionIDForProgram(program); + return await this.getTransactionObject(transaction_id); + } catch (error) { + throw new Error("Error fetching deployment transaction for program."); + } + } + + /** + * Returns the contents of the latest block. * * @example * const latestHeight = networkClient.getLatestBlock(); */ - async getLatestBlock(): Promise<Block> { + async getLatestBlock(): Promise<BlockJSON> { try { - return await this.fetchData<Block>("/block/latest") as Block; + return await this.fetchData<BlockJSON>("/block/latest") as BlockJSON; } catch (error) { throw new Error("Error fetching latest block."); } } /** - * Returns the latest committee + * Returns the latest committee. * * @returns {Promise<object>} A javascript object containing the latest committee */ @@ -384,7 +400,7 @@ class AleoNetworkClient { } /** - * Returns the latest block height + * Returns the latest block height. * * @example * const latestHeight = networkClient.getLatestHeight(); @@ -398,7 +414,7 @@ class AleoNetworkClient { } /** - * Returns the source code of a program given a program ID + * Returns the source code of a program given a program ID. * * @param {string} programId The program ID of a program deployed to the Aleo Network * @return {Promise<string>} Source code of the program @@ -417,7 +433,7 @@ class AleoNetworkClient { } /** - * Returns a program object from a program ID or program source code + * Returns a program object from a program ID or program source code. * * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network * @return {Promise<Program>} Source code of the program @@ -501,7 +517,7 @@ class AleoNetworkClient { } /** - * Get a list of the program names that a program imports + * Get a list of the program names that a program imports. * * @param {Program | string} inputProgram - The program id or program source code to get the imports of * @returns {string[]} - The list of program names that the program imports @@ -521,7 +537,7 @@ class AleoNetworkClient { } /** - * Returns the names of the mappings of a program + * Returns the names of the mappings of a program. * * @param {string} programId - The program ID to get the mappings of (e.g. "credits.aleo") * @example @@ -538,11 +554,11 @@ class AleoNetworkClient { } /** - * Returns the value of a program's mapping for a specific key + * Returns the value of a program's mapping for a specific key. * * @param {string} programId - The program ID to get the mapping value of (e.g. "credits.aleo") * @param {string} mappingName - The name of the mapping to get the value of (e.g. "account") - * @param {string} key - The key of the mapping to get the value of (e.g. "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px") + * @param {string | Plaintext} key - The key of the mapping to get the value of (e.g. "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px") * @return {Promise<string>} String representation of the value of the mapping * * @example @@ -551,16 +567,60 @@ class AleoNetworkClient { * const expectedValue = "0u64"; * assert.equal(mappingValue, expectedValue); */ - async getProgramMappingValue(programId: string, mappingName: string, key: string): Promise<string> { + async getProgramMappingValue(programId: string, mappingName: string, key: string | Plaintext): Promise<string> { try { - return await this.fetchData<string>("/program/" + programId + "/mapping/" + mappingName + "/" + key) + const keyString = key instanceof Plaintext ? key.toString() : key; + return await this.fetchData<string>("/program/" + programId + "/mapping/" + mappingName + "/" + keyString) } catch (error) { throw new Error("Error fetching mapping value - ensure the mapping exists and the key is correct"); } } + /** - * Returns the latest state/merkle root of the Aleo blockchain + * Returns the value of a mapping as a wasm Plaintext object. Returning an + * object in this format allows it to be converted to a Js type and for its + * internal members to be inspected if it's a struct or array. + * + * @example + * // Get the bond state as an account. + * const unbondedState = networkClient.getMappingPlaintext("credits.aleo", "bonded", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px"); + * + * // Get the two members of the object individually. + * const validator = unbondedState.getMember("validator"); + * const microcredits = unbondedState.getMember("microcredits"); + * + * // Ensure the expected values are correct. + * assert.equal(validator, "aleo1u6940v5m0fzud859xx2c9tj2gjg6m5qrd28n636e6fdd2akvfcgqs34mfd"); + * assert.equal(microcredits, BigInt("9007199254740991")); + * + * // Get a JS object representation of the unbonded state. + * const unbondedStateObject = unbondedState.toObject(); + * + * const expectedState = { + * validator: "aleo1u6940v5m0fzud859xx2c9tj2gjg6m5qrd28n636e6fdd2akvfcgqs34mfd", + * microcredits: BigInt("9007199254740991") + * }; + * assert.equal(unbondedState, expectedState); + * + * @param {string} programId - The program ID to get the mapping value of (e.g. "credits.aleo") + * @param {string} mappingName - The name of the mapping to get the value of (e.g. "account") + * @param {string | Plaintext} key - The key of the mapping to get the value of (e.g. "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px") + * + * @return {Promise<string>} String representation of the value of the mapping + */ + async getProgramMappingPlaintext(programId: string, mappingName: string, key: string | Plaintext): Promise<Plaintext> { + try { + const keyString = key instanceof Plaintext ? key.toString() : key; + const value = await this.fetchData<string>("/program/" + programId + "/mapping/" + mappingName + "/" + keyString); + return Plaintext.fromString(value); + } catch (error) { + throw new Error("Failed to fetch mapping value"); + } + } + + /** + * Returns the latest state/merkle root of the Aleo blockchain. * * @example * const stateRoot = networkClient.getStateRoot(); @@ -574,30 +634,85 @@ class AleoNetworkClient { } /** - * Returns a transaction by its unique identifier + * Returns a transaction by its unique identifier. * * @param {string} id * @example * const transaction = networkClient.getTransaction("at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj"); */ - async getTransaction(id: string): Promise<TransactionModel> { + async getTransaction(transactionId: string): Promise<TransactionJSON> { + try { + return await this.fetchData<TransactionJSON>("/transaction/" + transactionId); + } catch (error) { + throw new Error("Error fetching transaction."); + } + } + + /** + * Returns a transaction as a wasm object. Getting a transaction of this type will allow the ability for the inputs, + * outputs, and records to be searched for and displayed. + * + * @example + * const transactionObject = networkClient.getTransaction("at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj"); + * // Get the transaction inputs as a JS array. + * const transactionOutputs = transactionObject.inputs(true); + * + * // Get the transaction outputs as a JS object. + * const transactionInputs = transactionObject.outputs(true); + * + * // Get any records generated in transitions in the transaction as a JS object. + * const records = transactionObject.records(); + * + * // Get the transaction type. + * const transactionType = transactionObject.transactionType(); + * assert.equal(transactionType, "Execute"); + * + * // Get a JS representation of all inputs, outputs, and transaction metadata. + * const transactionSummary = transactionObject.summary(); + * + * @param {string} transactionId + * @example + */ + async getTransactionObject(transactionId: string): Promise<Transaction> { try { - return await this.fetchData<TransactionModel>("/transaction/" + id); + const transaction = await this.fetchData<string>("/transaction/" + transactionId); + return Transaction.fromString(transaction); } catch (error) { throw new Error("Error fetching transaction."); } } /** - * Returns the transactions present at the specified block height + * Returns the transactions present at the specified block height. * * @param {number} height * @example * const transactions = networkClient.getTransactions(654); */ - async getTransactions(height: number): Promise<Array<TransactionModel>> { + async getTransactions(height: number): Promise<Array<TransactionJSON>> { try { - return await this.fetchData<Array<TransactionModel>>("/block/" + height.toString() + "/transactions"); + return await this.fetchData<Array<TransactionJSON>>("/block/" + height.toString() + "/transactions"); + } catch (error) { + throw new Error("Error fetching transactions."); + } + } + + /** + * Returns an array of transactions as wasm objects present at the specified block height. + * + * @param {number} height + * @example + * const transactions = networkClient.getTransactionObjects(654); + * + * let transaction_summaries = transactions.map(transaction => transaction.summary()); + */ + async getTransactionObjects(height: number): Promise<Array<Transaction>> { + try { + return (await this.fetchData<Array<string>>("/block/" + height.toString() + "/transactions")) + .reduce<Array<Transaction>>((acc, transaction) => { + acc.push(Transaction.fromString(transaction)); + return acc; + }, []); } catch (error) { throw new Error("Error fetching transactions."); } @@ -609,9 +724,27 @@ class AleoNetworkClient { * @example * const transactions = networkClient.getTransactionsInMempool(); */ - async getTransactionsInMempool(): Promise<Array<TransactionModel>> { + async getTransactionsInMempool(): Promise<Array<TransactionJSON>> { try { - return await this.fetchData<Array<TransactionModel>>("/memoryPool/transactions"); + return await this.fetchData<Array<TransactionJSON>>("/memoryPool/transactions"); + } catch (error) { + throw new Error("Error fetching transactions from mempool."); + } + } + + /** + * Returns the transactions in the memory pool as wasm objects. + * + * @example + * const transactions = networkClient.getTransactionsInMempool(); + */ + async getTransactionObjectsInMempool(): Promise<Array<Transaction>> { + try { + return (await this.fetchData<Array<string>>("/memoryPool/transactions")) + .reduce<Array<Transaction>>((acc, transaction) => { + acc.push(Transaction.fromString(transaction)); + return acc; + }, []); } catch (error) { throw new Error("Error fetching transactions from mempool."); } @@ -633,7 +766,7 @@ class AleoNetworkClient { } /** - * Submit an execute or deployment transaction to the Aleo network + * Submit an execute or deployment transaction to the Aleo network. * * @param {Transaction | string} transaction - The transaction to submit to the network * @returns {string} - The transaction id of the submitted transaction or the resulting error @@ -659,6 +792,32 @@ class AleoNetworkClient { throw new Error(`Error posting transaction: No response received: ${error.message}`); } } + + /** + * Submit a solution to the Aleo network. + * + * @param {string} solution The string representation of the solution desired to be submitted to the network. + */ + async submitSolution(solution: string): Promise<string> { + try { + const response = await post(this.host + "/solution/broadcast", { + body: solution, + headers: Object.assign({}, this.headers, { + "Content-Type": "application/json", + }), + }); + + try { + const text = await response.text(); + return parseJSON(text); + + } catch (error: any) { + throw new Error(`Error posting transaction. Aleo network response: ${error.message}`); + } + } catch (error: any) { + throw new Error(`Error posting transaction: No response received: ${error.message}`); + } + } } export { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports } diff --git a/sdk/src/polyfill/worker.ts b/sdk/src/polyfill/worker.ts index 8f979db29..7e05d61a9 100644 --- a/sdk/src/polyfill/worker.ts +++ b/sdk/src/polyfill/worker.ts @@ -32,10 +32,11 @@ globalThis.Worker = class Worker extends EventTarget { } const code = ` - const { workerData } = require("node:worker_threads"); - - import(workerData.polyfill) - .then(() => import(workerData.url)) + import("node:worker_threads") + .then(({ workerData }) => { + return import(workerData.polyfill) + .then(() => import(workerData.url)) + }) .catch((e) => { // TODO maybe it should send a message to the parent? console.error(e.stack); diff --git a/sdk/src/wasm.ts b/sdk/src/wasm.ts index 8258e8a6f..1ba048720 100644 --- a/sdk/src/wasm.ts +++ b/sdk/src/wasm.ts @@ -1,10 +1,13 @@ export { Address, + Ciphertext, Execution, ExecutionResponse, Field, + Group, OfflineQuery, Metadata, + Plaintext, PrivateKey, PrivateKeyCiphertext, Program, @@ -12,8 +15,10 @@ export { ProvingKey, RecordCiphertext, RecordPlaintext, + Scalar, Signature, Transaction, + Transition, VerifyingKey, ViewKey, initThreadPool, diff --git a/sdk/tests/arithmetic.test.ts b/sdk/tests/arithmetic.test.ts new file mode 100644 index 000000000..34ccc1b3e --- /dev/null +++ b/sdk/tests/arithmetic.test.ts @@ -0,0 +1,104 @@ +import sinon from "sinon"; +import { expect } from "chai"; +import { Field, Scalar, Group} from "../src/node"; + +describe('Field and Group Arithmetic Tests', () => { + afterEach(() => { + sinon.restore(); + }); + + describe('Field and Group arithmetic', () => { + it('Check field arithmetic functions work as expected', () => { + // Create the 2 field element. + const a = Field.fromString("2field"); + // Create the inverse of the 2 field element. + const ainv = a.inverse(); + // Create another 2 scale element. + const b = Field.fromString("2field"); + // Double the field through addition. + const c = a.add(b); + // Double the field through the double operation. + const d = a.double(); + // Create the 8 field from string. + const eight = Field.fromString("8field"); + // Create the 0 field. + const zero = Field.zero(); + // Create the 0 field through adding a and ainv. + const zero_inv = a.add(ainv); + // Create the zero element through subtraction (same operation as a + ainv). + const zero_sub = a.subtract(b); + // Take the 2 element to the power 4. + const two_power_four = a.pow(c); + // Multiply the two element by the 8 element. + const two_times_eight = a.multiply(eight); + // Ensure two elements of the same value are equal. + expect(a.equals(b)).equal(true); + // Ensure adding 2 same valued elements and the doubling operation lead to the same value. + expect(c.equals(d)).equal(true); + // Ensure that a + ainv i zero. + expect(zero_inv.equals(zero)).equal(true); + // Ensure that 2 - 2 (i.e. 2 + inv(2)) == 0. + expect(zero_sub.equals(zero)).equal(true); + // Ensure 2^4 & 2*8 are equal. + expect(two_power_four.equals(two_times_eight)).equal(true); + }); + + it('Check scalar field arithmetic', () => { + // Create the 2 scalar element. + const a = Scalar.fromString("2scalar"); + // Create the inverse of the 2 scalar element. + const ainv = a.inverse(); + // Create another 2 scale element. + const b = Scalar.fromString("2scalar"); + // Double the scalar through addition. + const c = a.add(b); + // Double the scalar through the double operation. + const d = a.double(); + // Create the 8 scalar from string. + const eight = Scalar.fromString("8scalar"); + // Create the 0 scalar. + const zero = Scalar.zero(); + // Create the 0 scalar through adding a and ainv. + const zero_inv = a.add(ainv); + // Create the zero element through subtraction (same operation as a + ainv). + const zero_sub = a.subtract(b); + // Take the 2 element to the power 4. + const two_power_four = a.pow(c); + // Multiply the two element by the 8 element. + const two_times_eight = a.multiply(eight); + // Ensure two elements of the same value are equal. + expect(a.equals(b)).equal(true); + // Ensure adding 2 same valued elements and the doubling operation lead to the same value. + expect(c.equals(d)).equal(true); + // Ensure that a + ainv i zero. + expect(zero_inv.equals(zero)).equal(true); + // Ensure that 2 - 2 (i.e. 2 + inv(2)) == 0. + expect(zero_sub.equals(zero)).equal(true); + // Ensure 2^4 & 2*8 are equal. + expect(two_power_four.equals(two_times_eight)).equal(true); + }); + + it('Test group operations', () => { + // Get the 2 element of the group. + const G = Group.fromString("2group"); + // Get the point at infinity (i.e. "0"/additive identity in elliptic curves). + const Ginf = Group.zero(); + // Get a 2 element of the scalar field. + const a = Scalar.fromString("2scalar"); + // Double the point through addition. + const b = G.add(G); + // Double the point through the addition operation. + const c = G.double(); + // Do a point doubling through scalar multiplication. + const d = G.scalarMultiply(a); + // Find point (x, -y) + const G_inv= G.inverse(); + // Ensure addition and doubling landed on the same point. + expect(b.equals(c)).equals(true); + // Ensure point doubling and scalar multiplication by 2scalar ends up as the same element as doubling. + expect(c.equals(d)).equals(true); + // Ensure adding the inverse element leads to the point at infinity. + expect((G.add(G_inv)).equals(Ginf)).equals(true); + }); + }); +}); diff --git a/sdk/tests/key-provider.test.ts b/sdk/tests/key-provider.test.ts index d3bc18c8f..ba329a237 100644 --- a/sdk/tests/key-provider.test.ts +++ b/sdk/tests/key-provider.test.ts @@ -11,134 +11,134 @@ describe('KeyProvider', () => { }); describe('getKeys', () => { - it('should not fetch invalid transfer keys', async () => { - try { - const keys = await keyProvider.transferKeys("invalid"); - // This should never be reached - expect(true).equal(false); - } catch (e) { - expect(e).instanceof(Error); - } - }); - - it('Should use cache when set and not use it when not', async () => { - // Ensure the cache properly downloads and stores keys - keyProvider.useCache(true); - - const [provingKey, verifyingKey] = <FunctionKeyPair>await keyProvider.feePublicKeys(); - expect(keyProvider.cache.size).equal(1); - expect(provingKey).instanceof(ProvingKey); - expect(verifyingKey).instanceof(VerifyingKey); - - const transferCacheKey = keyProvider.cache.keys().next().value; - const [cachedProvingKey, cachedVerifyingKey] = <CachedKeyPair>keyProvider.cache.get(transferCacheKey!); - expect(cachedProvingKey).instanceof(Uint8Array); - expect(cachedVerifyingKey).instanceof(Uint8Array); - - // Ensure the functionKeys method to get the keys and that the cache is used to do so - const [fetchedProvingKey, fetchedVerifyingKey] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public) - expect(keyProvider.cache.size).equal(1); - expect(fetchedProvingKey).instanceof(ProvingKey); - expect(fetchedVerifyingKey).instanceof(VerifyingKey); - - // Clear the cache and turn it off to ensure the keys are re-downloaded and the cache is not used - keyProvider.clearCache(); - keyProvider.useCache(false); - const [redownloadedProvingKey, redownloadedVerifyingKey] = <FunctionKeyPair>await keyProvider.feePublicKeys(); - expect(keyProvider.cache.size).equal(0); - expect(redownloadedProvingKey).instanceof(ProvingKey); - expect(redownloadedVerifyingKey).instanceof(VerifyingKey); - }); - - it.skip("Should not fetch offline keys that haven't already been stored", async () => { - // Download the credits.aleo function keys - const [bondPublicProver, bondPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public); - const [claimUnbondPublicProver, claimUnbondVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public); - const [feePrivateProver, feePrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private); - const [feePublicProver, feePublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public); - const [joinProver, joinVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join); - const [setValidatorStateProver, setValidatorStateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.set_validator_state); - const [splitProver, splitVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split); - const [transferPrivateProver, transferPrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private); - const [transferPrivateToPublicProver, transferPrivateToPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public); - const [transferPublicProver, transferPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public); - const [transferPublicToPrivateProver, transferPublicToPrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private); - const [unbondPublicProver, unbondPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public); - - // Ensure the insertion methods work as expected without throwing an exception - offlineKeyProvider.insertBondPublicKeys(bondPublicProver); - offlineKeyProvider.insertClaimUnbondPublicKeys(claimUnbondPublicProver); - offlineKeyProvider.insertFeePrivateKeys(feePrivateProver); - offlineKeyProvider.insertFeePublicKeys(feePublicProver); - offlineKeyProvider.insertJoinKeys(joinProver); - offlineKeyProvider.insertSetValidatorStateKeys(setValidatorStateProver); - offlineKeyProvider.insertSplitKeys(splitProver); - offlineKeyProvider.insertTransferPrivateKeys(transferPrivateProver); - offlineKeyProvider.insertTransferPrivateToPublicKeys(transferPrivateToPublicProver); - offlineKeyProvider.insertTransferPublicKeys(transferPublicProver); - offlineKeyProvider.insertTransferPublicToPrivateKeys(transferPublicToPrivateProver); - offlineKeyProvider.insertUnbondPublicKeys(unbondPublicProver); - - // Ensure the offline key provider methods for credits.aleo return the correct keys - const [bondPublicProverLocal, bondPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.bondPublicKeys(); - const [claimUnbondPublicProverLocal, claimUnbondVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.claimUnbondPublicKeys(); - const [feePrivateProverLocal, feePrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.feePrivateKeys(); - const [feePublicProverLocal, feePublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.feePublicKeys(); - const [joinProverLocal, joinVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.joinKeys(); - const [splitProverLocal, splitVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.splitKeys(); - const [transferPrivateProverLocal, transferPrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("private"); - const [transferPrivateToPublicProverLocal, transferPrivateToPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("privateToPublic"); - const [transferPublicProverLocal, transferPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("public"); - const [transferPublicToPrivateProverLocal, transferPublicToPrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("publicToPrivate"); - const [unbondPublicProverLocal, unbondPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.unBondPublicKeys(); - - // Ensure the checksum of the recovered keys match those of the original keys - expect(bondPublicProver.checksum()).equal(bondPublicProverLocal.checksum()); - expect(bondPublicVerifier.checksum()).equal(bondPublicVerifierLocal.checksum()); - expect(claimUnbondPublicProver.checksum()).equal(claimUnbondPublicProverLocal.checksum()); - expect(claimUnbondVerifier.checksum()).equal(claimUnbondVerifierLocal.checksum()); - expect(feePrivateProver.checksum()).equal(feePrivateProverLocal.checksum()); - expect(feePrivateVerifier.checksum()).equal(feePrivateVerifierLocal.checksum()); - expect(feePublicProver.checksum()).equal(feePublicProverLocal.checksum()); - expect(feePublicVerifier.checksum()).equal(feePublicVerifierLocal.checksum()); - expect(joinProver.checksum()).equal(joinProverLocal.checksum()); - expect(joinVerifier.checksum()).equal(joinVerifierLocal.checksum()); - expect(splitProver.checksum()).equal(splitProverLocal.checksum()); - expect(splitVerifier.checksum()).equal(splitVerifierLocal.checksum()); - expect(transferPrivateProver.checksum()).equal(transferPrivateProverLocal.checksum()); - expect(transferPrivateVerifier.checksum()).equal(transferPrivateVerifierLocal.checksum()); - expect(transferPrivateToPublicProver.checksum()).equal(transferPrivateToPublicProverLocal.checksum()); - expect(transferPrivateToPublicVerifier.checksum()).equal(transferPrivateToPublicVerifierLocal.checksum()); - expect(transferPublicProver.checksum()).equal(transferPublicProverLocal.checksum()); - expect(transferPublicVerifier.checksum()).equal(transferPublicVerifierLocal.checksum()); - expect(transferPublicToPrivateProver.checksum()).equal(transferPublicToPrivateProverLocal.checksum()); - expect(transferPublicToPrivateVerifier.checksum()).equal(transferPublicToPrivateVerifierLocal.checksum()); - expect(unbondPublicProver.checksum()).equal(unbondPublicProverLocal.checksum()); - expect(unbondPublicVerifier.checksum()).equal(unbondPublicVerifierLocal.checksum()); - - // Ensure the recovered keys are of the correct type - expect(bondPublicProverLocal.isBondPublicProver()).equal(true); - expect(bondPublicVerifierLocal.isBondPublicVerifier()).equal(true); - expect(claimUnbondPublicProverLocal.isClaimUnbondPublicProver()).equal(true); - expect(claimUnbondVerifierLocal.isClaimUnbondPublicVerifier()).equal(true); - expect(feePrivateProverLocal.isFeePrivateProver()).equal(true); - expect(feePrivateVerifierLocal.isFeePrivateVerifier()).equal(true); - expect(feePublicProverLocal.isFeePublicProver()).equal(true); - expect(feePublicVerifierLocal.isFeePublicVerifier()).equal(true); - expect(joinProverLocal.isJoinProver()).equal(true); - expect(joinVerifierLocal.isJoinVerifier()).equal(true); - expect(splitProverLocal.isSplitProver()).equal(true); - expect(splitVerifierLocal.isSplitVerifier()).equal(true); - expect(transferPrivateProverLocal.isTransferPrivateProver()).equal(true); - expect(transferPrivateVerifierLocal.isTransferPrivateVerifier()).equal(true); - expect(transferPrivateToPublicProverLocal.isTransferPrivateToPublicProver()).equal(true); - expect(transferPrivateToPublicVerifierLocal.isTransferPrivateToPublicVerifier()).equal(true); - expect(transferPublicProverLocal.isTransferPublicProver()).equal(true); - expect(transferPublicVerifierLocal.isTransferPublicVerifier()).equal(true); - expect(transferPublicToPrivateProverLocal.isTransferPublicToPrivateProver()).equal(true); - expect(transferPublicToPrivateVerifierLocal.isTransferPublicToPrivateVerifier()).equal(true); - expect(unbondPublicProverLocal.isUnbondPublicProver()).equal(true); - expect(unbondPublicVerifierLocal.isUnbondPublicVerifier()).equal(true); - }); + // it('should not fetch invalid transfer keys', async () => { + // try { + // const keys = await keyProvider.transferKeys("invalid"); + // // This should never be reached + // expect(true).equal(false); + // } catch (e) { + // expect(e).instanceof(Error); + // } + // }); + // + // it('Should use cache when set and not use it when not', async () => { + // // Ensure the cache properly downloads and stores keys + // keyProvider.useCache(true); + // + // const [provingKey, verifyingKey] = <FunctionKeyPair>await keyProvider.feePublicKeys(); + // expect(keyProvider.cache.size).equal(1); + // expect(provingKey).instanceof(ProvingKey); + // expect(verifyingKey).instanceof(VerifyingKey); + // + // const transferCacheKey = keyProvider.cache.keys().next().value; + // const [cachedProvingKey, cachedVerifyingKey] = <CachedKeyPair>keyProvider.cache.get(transferCacheKey!); + // expect(cachedProvingKey).instanceof(Uint8Array); + // expect(cachedVerifyingKey).instanceof(Uint8Array); + // + // // Ensure the functionKeys method to get the keys and that the cache is used to do so + // const [fetchedProvingKey, fetchedVerifyingKey] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public) + // expect(keyProvider.cache.size).equal(1); + // expect(fetchedProvingKey).instanceof(ProvingKey); + // expect(fetchedVerifyingKey).instanceof(VerifyingKey); + // + // // Clear the cache and turn it off to ensure the keys are re-downloaded and the cache is not used + // keyProvider.clearCache(); + // keyProvider.useCache(false); + // const [redownloadedProvingKey, redownloadedVerifyingKey] = <FunctionKeyPair>await keyProvider.feePublicKeys(); + // expect(keyProvider.cache.size).equal(0); + // expect(redownloadedProvingKey).instanceof(ProvingKey); + // expect(redownloadedVerifyingKey).instanceof(VerifyingKey); + // }); + // + // it.skip("Should not fetch offline keys that haven't already been stored", async () => { + // // Download the credits.aleo function keys + // const [bondPublicProver, bondPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.bond_public); + // const [claimUnbondPublicProver, claimUnbondVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.claim_unbond_public); + // const [feePrivateProver, feePrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_private); + // const [feePublicProver, feePublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.fee_public); + // const [joinProver, joinVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.join); + // const [setValidatorStateProver, setValidatorStateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.set_validator_state); + // const [splitProver, splitVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.split); + // const [transferPrivateProver, transferPrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private); + // const [transferPrivateToPublicProver, transferPrivateToPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_private_to_public); + // const [transferPublicProver, transferPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public); + // const [transferPublicToPrivateProver, transferPublicToPrivateVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.transfer_public_to_private); + // const [unbondPublicProver, unbondPublicVerifier] = <FunctionKeyPair>await keyProvider.fetchCreditsKeys(CREDITS_PROGRAM_KEYS.unbond_public); + // + // // Ensure the insertion methods work as expected without throwing an exception + // offlineKeyProvider.insertBondPublicKeys(bondPublicProver); + // offlineKeyProvider.insertClaimUnbondPublicKeys(claimUnbondPublicProver); + // offlineKeyProvider.insertFeePrivateKeys(feePrivateProver); + // offlineKeyProvider.insertFeePublicKeys(feePublicProver); + // offlineKeyProvider.insertJoinKeys(joinProver); + // offlineKeyProvider.insertSetValidatorStateKeys(setValidatorStateProver); + // offlineKeyProvider.insertSplitKeys(splitProver); + // offlineKeyProvider.insertTransferPrivateKeys(transferPrivateProver); + // offlineKeyProvider.insertTransferPrivateToPublicKeys(transferPrivateToPublicProver); + // offlineKeyProvider.insertTransferPublicKeys(transferPublicProver); + // offlineKeyProvider.insertTransferPublicToPrivateKeys(transferPublicToPrivateProver); + // offlineKeyProvider.insertUnbondPublicKeys(unbondPublicProver); + // + // // Ensure the offline key provider methods for credits.aleo return the correct keys + // const [bondPublicProverLocal, bondPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.bondPublicKeys(); + // const [claimUnbondPublicProverLocal, claimUnbondVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.claimUnbondPublicKeys(); + // const [feePrivateProverLocal, feePrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.feePrivateKeys(); + // const [feePublicProverLocal, feePublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.feePublicKeys(); + // const [joinProverLocal, joinVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.joinKeys(); + // const [splitProverLocal, splitVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.splitKeys(); + // const [transferPrivateProverLocal, transferPrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("private"); + // const [transferPrivateToPublicProverLocal, transferPrivateToPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("privateToPublic"); + // const [transferPublicProverLocal, transferPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("public"); + // const [transferPublicToPrivateProverLocal, transferPublicToPrivateVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.transferKeys("publicToPrivate"); + // const [unbondPublicProverLocal, unbondPublicVerifierLocal] = <FunctionKeyPair>await offlineKeyProvider.unBondPublicKeys(); + // + // // Ensure the checksum of the recovered keys match those of the original keys + // expect(bondPublicProver.checksum()).equal(bondPublicProverLocal.checksum()); + // expect(bondPublicVerifier.checksum()).equal(bondPublicVerifierLocal.checksum()); + // expect(claimUnbondPublicProver.checksum()).equal(claimUnbondPublicProverLocal.checksum()); + // expect(claimUnbondVerifier.checksum()).equal(claimUnbondVerifierLocal.checksum()); + // expect(feePrivateProver.checksum()).equal(feePrivateProverLocal.checksum()); + // expect(feePrivateVerifier.checksum()).equal(feePrivateVerifierLocal.checksum()); + // expect(feePublicProver.checksum()).equal(feePublicProverLocal.checksum()); + // expect(feePublicVerifier.checksum()).equal(feePublicVerifierLocal.checksum()); + // expect(joinProver.checksum()).equal(joinProverLocal.checksum()); + // expect(joinVerifier.checksum()).equal(joinVerifierLocal.checksum()); + // expect(splitProver.checksum()).equal(splitProverLocal.checksum()); + // expect(splitVerifier.checksum()).equal(splitVerifierLocal.checksum()); + // expect(transferPrivateProver.checksum()).equal(transferPrivateProverLocal.checksum()); + // expect(transferPrivateVerifier.checksum()).equal(transferPrivateVerifierLocal.checksum()); + // expect(transferPrivateToPublicProver.checksum()).equal(transferPrivateToPublicProverLocal.checksum()); + // expect(transferPrivateToPublicVerifier.checksum()).equal(transferPrivateToPublicVerifierLocal.checksum()); + // expect(transferPublicProver.checksum()).equal(transferPublicProverLocal.checksum()); + // expect(transferPublicVerifier.checksum()).equal(transferPublicVerifierLocal.checksum()); + // expect(transferPublicToPrivateProver.checksum()).equal(transferPublicToPrivateProverLocal.checksum()); + // expect(transferPublicToPrivateVerifier.checksum()).equal(transferPublicToPrivateVerifierLocal.checksum()); + // expect(unbondPublicProver.checksum()).equal(unbondPublicProverLocal.checksum()); + // expect(unbondPublicVerifier.checksum()).equal(unbondPublicVerifierLocal.checksum()); + // + // // Ensure the recovered keys are of the correct type + // expect(bondPublicProverLocal.isBondPublicProver()).equal(true); + // expect(bondPublicVerifierLocal.isBondPublicVerifier()).equal(true); + // expect(claimUnbondPublicProverLocal.isClaimUnbondPublicProver()).equal(true); + // expect(claimUnbondVerifierLocal.isClaimUnbondPublicVerifier()).equal(true); + // expect(feePrivateProverLocal.isFeePrivateProver()).equal(true); + // expect(feePrivateVerifierLocal.isFeePrivateVerifier()).equal(true); + // expect(feePublicProverLocal.isFeePublicProver()).equal(true); + // expect(feePublicVerifierLocal.isFeePublicVerifier()).equal(true); + // expect(joinProverLocal.isJoinProver()).equal(true); + // expect(joinVerifierLocal.isJoinVerifier()).equal(true); + // expect(splitProverLocal.isSplitProver()).equal(true); + // expect(splitVerifierLocal.isSplitVerifier()).equal(true); + // expect(transferPrivateProverLocal.isTransferPrivateProver()).equal(true); + // expect(transferPrivateVerifierLocal.isTransferPrivateVerifier()).equal(true); + // expect(transferPrivateToPublicProverLocal.isTransferPrivateToPublicProver()).equal(true); + // expect(transferPrivateToPublicVerifierLocal.isTransferPrivateToPublicVerifier()).equal(true); + // expect(transferPublicProverLocal.isTransferPublicProver()).equal(true); + // expect(transferPublicVerifierLocal.isTransferPublicVerifier()).equal(true); + // expect(transferPublicToPrivateProverLocal.isTransferPublicToPrivateProver()).equal(true); + // expect(transferPublicToPrivateVerifierLocal.isTransferPublicToPrivateVerifier()).equal(true); + // expect(unbondPublicProverLocal.isUnbondPublicProver()).equal(true); + // expect(unbondPublicVerifierLocal.isUnbondPublicVerifier()).equal(true); + // }); }); }); diff --git a/sdk/tests/network-client.test.ts b/sdk/tests/network-client.test.ts index 3c4535dce..a92d73ce3 100644 --- a/sdk/tests/network-client.test.ts +++ b/sdk/tests/network-client.test.ts @@ -1,9 +1,10 @@ import sinon from "sinon"; import { expect } from "chai"; -import {Account, Block, AleoNetworkClient, TransactionModel} from "../src/node"; -import {beaconAddressString, beaconPrivateKeyString} from "./data/account-data"; -import {log} from "console"; - +import { Account, BlockJSON, AleoNetworkClient, TransactionSummary, InputObject, OutputObject } from "../src/node"; +import {beaconPrivateKeyString} from "./data/account-data"; +import { Plaintext, Transition } from "@provablehq/wasm"; +import { TransitionObject } from "../src/models/transition/transitionObject"; +import { PlaintextObject } from "../src/models/plaintext/plaintext"; async function catchError(f: () => Promise<any>): Promise<Error | null> { try { @@ -48,7 +49,7 @@ describe('NodeConnection', () => { describe('getBlock', () => { it.skip('should return a Block object', async () => { const block = await connection.getBlock(1); - expect((block as Block).block_hash).equal("ab1eddc3np4h6duwf5a7ht6u0x5maa08780l885j6xq0s7l88df0qrq3d72me"); + expect((block as BlockJSON).block_hash).equal("ab1eddc3np4h6duwf5a7ht6u0x5maa08780l885j6xq0s7l88df0qrq3d72me"); }); it('should throw an error if the request fails', async () => { @@ -63,9 +64,9 @@ describe('NodeConnection', () => { it.skip('should return an array of Block objects', async () => { const blockRange = await connection.getBlockRange(1, 3); expect(Array.isArray(blockRange)).equal(true); - expect((blockRange as Block[]).length).equal(3); - expect(((blockRange as Block[])[0] as Block).block_hash).equal("ab1eddc3np4h6duwf5a7ht6u0x5maa08780l885j6xq0s7l88df0qrq3d72me"); - expect(((blockRange as Block[])[1] as Block).block_hash).equal("ab1uqmm97qk5gzhgwh6308h48aszazhfnn0xdq84lrj7e7myyrf9yyqmqdf42"); + expect((blockRange as BlockJSON[]).length).equal(3); + expect(((blockRange as BlockJSON[])[0] as BlockJSON).block_hash).equal("ab1eddc3np4h6duwf5a7ht6u0x5maa08780l885j6xq0s7l88df0qrq3d72me"); + expect(((blockRange as BlockJSON[])[1] as BlockJSON).block_hash).equal("ab1uqmm97qk5gzhgwh6308h48aszazhfnn0xdq84lrj7e7myyrf9yyqmqdf42"); }); it('should throw an error if the request fails', async () => { @@ -95,7 +96,7 @@ describe('NodeConnection', () => { describe('getLatestBlock', () => { it('should return a Block object', async () => { const latestBlock = await connection.getLatestBlock(); - expect(typeof (latestBlock as Block).block_hash).equal('string'); + expect(typeof (latestBlock as BlockJSON).block_hash).equal('string'); }); it('should set the X-Aleo-SDK-Version header', async () => { @@ -225,4 +226,96 @@ describe('NodeConnection', () => { } }); }); + + describe('Test API methods that return wasm objects', () => { + it('should return a struct whose object representation matches the wasm representation', async () => { + // Ensure we're on testnet. + const transactions = await connection.getTransactionObjects(27400); + if (transactions.length > 1) { + // Check the credits.aleo mapping. + const plaintext = await connection.getProgramMappingPlaintext("credits.aleo", "committee", "aleo17m3l8a4hmf3wypzkf5lsausfdwq9etzyujd0vmqh35ledn2sgvqqzqkqal"); + const text = await connection.getProgramMappingValue("credits.aleo", "committee", "aleo17m3l8a4hmf3wypzkf5lsausfdwq9etzyujd0vmqh35ledn2sgvqqzqkqal"); + + // Ensure the plaintext toString is the same as the api response. + expect(text).equal(plaintext.toString()); + + // Ensure the JS object representation matches the wasm representation. + const isOpen = (<Plaintext>plaintext.find("is_open")).toObject(); + const commission = (<Plaintext>plaintext.find("commission")).toObject(); + const plaintextObject = plaintext.toObject(); + expect(plaintextObject.is_open).equal(isOpen); + expect(plaintextObject.commission).equal(commission); + } + }); + + it('should have a correct transaction summary', async () => { + // Get the transactions at block 27400 on testnet. + const transactions = await connection.getTransactionObjects(27400); + if (transactions.length > 1) { + const transaction = transactions[0]; + const transition = <Transition>transaction.transitions()[0]; + const summary = <TransactionSummary>transactions[0].summary(true); + + // Ensure the transaction metadata was correctly computed. + expect(transactions.length).equal(3); + expect(transaction.id()).equal("at1fjy6s9md2v4rgcn3j3q4qndtfaa2zvg58a4uha0rujvrn4cumu9qfazxdd"); + expect(transaction.isExecute()).equal(true); + expect(transaction.isFee()).equals(false); + expect(transaction.isDeploy()).equals(false); + expect(transaction.records().length).equals( 0); + + // Check the transition object contains the correct transition metadata + expect(transition.programId()).equals("puzzle_arcade_coin_v001.aleo") + expect(transition.functionName()).equals("mint"); + expect(transition.inputs(true).length).equals(2); + expect(transition.outputs(true).length).equals(1); + expect(transition.tpk().toString()).equals("6666707959509237020554863505720154589525217196021270704042929032892063700604group"); + expect(transition.tcm().toString()).equals("5140704971235445395514301730284508935687584564904251867869912904008739082032field"); + expect(transition.scm().toString()).equals("4048085747685910464005835076598544744404883618916202014212851266936759881218field"); + + // Ensure the object summary returns the correct transaction metadata. + expect(summary.type).equals(transaction.transactionType()); + expect(summary.fee).equals(transaction.feeAmount()); + expect(summary.transitions.length).equals(1); + expect(<string>summary.transitions[0].tpk).equals("6666707959509237020554863505720154589525217196021270704042929032892063700604group"); + expect(<string>summary.transitions[0].tcm).equals("5140704971235445395514301730284508935687584564904251867869912904008739082032field"); + expect(<string>summary.transitions[0].scm).equals("4048085747685910464005835076598544744404883618916202014212851266936759881218field"); + expect(summary.transitions[0].functionName).equals("transfer_public"); + expect(summary.id).equals(transaction.transactionId()); + expect(summary.fee).equals(transaction.feeAmount()); + expect(summary.baseFee).equals(transaction.baseFeeAmount()); + expect(summary.priorityFee).equals(transaction.priorityFeeAmount()); + + // Check inputs. + const transition_summary = <TransitionObject>summary.transitions[0]; + const transition_inputs = <InputObject[]>transition_summary.inputs; + const transition_outputs = <OutputObject[]>transition_summary.outputs; + // Ensure the transition_summary matches the wasm object. + expect(transition_summary.tpk).equals(transition.tpk().toString()); + expect(transition_summary.tcm).equals(transition.tcm().toString()); + expect(transition_summary.scm).equals(transition.scm().toString()); + expect(transition_summary.functionName).equals(transition.functionName()); + expect(transition_summary.id).equals(transition.id()); + expect(transition_summary.program).equals(transition.programId()); + expect(transition_inputs.length).equals(transition.inputs(true).length); + expect(transition_outputs.length).equals(transition.outputs(true).length); + + // Check the summary's inputs and outputs match expected values. + const transition_input_1 = <InputObject>transition_inputs[0]; + const transition_input_2 = <InputObject>transition_inputs[1]; + const transition_output_1 = <OutputObject>transition_outputs[0]; + const transition_future_arguments = <PlaintextObject[]>transition_output_1.arguments; + expect(transition_input_1.type).equals("public"); + expect(transition_input_2.type).equals("public"); + expect(<string>transition_input_1.value).equals("aleo1mltea0uj6865k5qvvf4er424wg8kqgh4ldlkgav7qzrzrw3mmvgq5rj3s8"); + expect(<bigint>transition_input_1.value).equals(BigInt(1000000)); + expect(transition_output_1.type).equals("future"); + expect(<string>transition_output_1.programId).equals("credits.aleo"); + expect(<string>transition_output_1.functionName).equals("transfer_public"); + expect(transition_future_arguments.length).equals(2); + expect(<string>transition_future_arguments[0]).equals("aleo193cgzzpr5lcwq6rmzq4l2ctg5f4mznead080mclfgrc0e5k0w5pstfdfps"); + expect(<bigint>transition_future_arguments[1]).equals(BigInt(1449)); + } + }); + }) }); diff --git a/sdk/tests/program-manager.test.ts b/sdk/tests/program-manager.test.ts index 429ad5d7f..f7033ab7d 100644 --- a/sdk/tests/program-manager.test.ts +++ b/sdk/tests/program-manager.test.ts @@ -23,7 +23,7 @@ describe('Program Manager', () => { describe('Offline query', () => { it.skip('The offline query should work as expected', async () => { - const offlineQuery = new OfflineQuery(stateRoot); + const offlineQuery = new OfflineQuery(1, stateRoot); const record_plaintext = RecordPlaintext.fromString(statePathRecord); const commitment = record_plaintext.commitment("credits.aleo", "credits").toString(); offlineQuery.addStatePath(commitment, recordStatePath); diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index a38dea04d..a8057ca79 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -94,7 +94,7 @@ checksum = "7e4f181fc1a372e8ceff89612e5c9b13f72bff5b066da9f8d6827ae65af492c4" [[package]] name = "aleo-wasm" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "async-trait", @@ -1538,8 +1538,9 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d91040c5a51a3c335741aa4fbb8176a612d44760f040c7d9d5833653c6691e" dependencies = [ "aleo-std", "anyhow", @@ -1569,8 +1570,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8208642e213e2e20a07d7ceb7facb2e080be99714d55d2ebc67dcdbd6b4aef8b" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-algorithms", @@ -1583,8 +1585,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-account" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca4758873037211d81f1d40bfdd6ae1904aabb7298a4217ff83baaddca7f70b7" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-network", @@ -1594,8 +1597,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-algorithms" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec8ca5e7f6b08e6854e31be1c1207cf6ca26da64f91912d264b0752b14f51cf" dependencies = [ "snarkvm-circuit-types", "snarkvm-console-algorithms", @@ -1604,8 +1608,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-collections" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a709a676a90ce395b811d138698995b515ecc39186772ff7f3c3bb1e1654fbc" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-types", @@ -1614,8 +1619,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "789c270e95ca1707e3f7d7bd0cc6e90a144cc3a502fe08afde553d6ac0bba9b1" dependencies = [ "indexmap", "itertools", @@ -1632,13 +1638,15 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment-witness" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ad62fa4ac3a96440d5ebbda604d9cadaf89d518ecd9b062538213820f37c45" [[package]] name = "snarkvm-circuit-network" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb397309d0c2ddae4fa21fe28b676801e1b4ac352c51c19d7f5fb5f71d968b2d" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-collections", @@ -1648,8 +1656,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-program" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c32c9e1d5f97212a8f78083b73141d38ee65b120fbd30494fbb76829cb41414" dependencies = [ "paste", "snarkvm-circuit-account", @@ -1663,8 +1672,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aff3706d5b770254d967c4771e684424f2440d774945c671fa45883eb5d59e0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-address", @@ -1678,8 +1688,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-address" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0973cefa284be203c7b6e8f408d8115a8520fc10fa0e717c2560fca2ee1f07af" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1691,8 +1702,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-boolean" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7137bc6814f983597d6f50d2f88e7dce90237f34586526fbc8d77f841b5455b" dependencies = [ "snarkvm-circuit-environment", "snarkvm-console-types-boolean", @@ -1700,8 +1712,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-field" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee531ed89f191a5714684e65c7c271eb1af87bec71abbbc9928e325c0e80674" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1710,8 +1723,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-group" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2696c6891bf303cfe71ead8378d98f7faea98c76311ef3d15c85191598ddd481" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1722,8 +1736,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-integers" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85f70807c61d48cabe62b59e5e93fcbb107b62835176c2fe10dcd7a98d02ce15" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1734,8 +1749,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-scalar" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aba07230428833ac7eecd478f18baa6370b1eb68fe1f1ef93fc3e6c37312e8b6" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1745,8 +1761,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-string" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30fb5a0a45eb4982902325912636a82e601b002fadff3d8415e489129c6a846c" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -1757,8 +1774,9 @@ dependencies = [ [[package]] name = "snarkvm-console" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157d8026f2ad796f03a4d41753a9cf2496625d829bb785020e83c2d5554e246a" dependencies = [ "snarkvm-console-account", "snarkvm-console-algorithms", @@ -1770,8 +1788,9 @@ dependencies = [ [[package]] name = "snarkvm-console-account" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909aeac3e1fd4e0f4e56b0ed74d590b9c1a4ff9ab6144fb9b6b81483f0705b99" dependencies = [ "bs58", "snarkvm-console-network", @@ -1781,8 +1800,9 @@ dependencies = [ [[package]] name = "snarkvm-console-algorithms" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7271e3a4e79b8e23a2461695b84e7d22e329b2089b9b05365627f9e6f3e17cb8" dependencies = [ "blake2s_simd", "smallvec", @@ -1794,8 +1814,9 @@ dependencies = [ [[package]] name = "snarkvm-console-collections" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b330afcf51263442b406b260b18d04b91ce395133390290c637ca79c38973b8" dependencies = [ "aleo-std", "rayon", @@ -1805,8 +1826,9 @@ dependencies = [ [[package]] name = "snarkvm-console-network" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63d8154a1456f6e4d0ff458a1107d98c596e095a5ef1fd019cbcfa4ea2e6bf6f" dependencies = [ "anyhow", "indexmap", @@ -1828,8 +1850,9 @@ dependencies = [ [[package]] name = "snarkvm-console-network-environment" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20fd9b2abd65743d04f45533941af710fece03d6ab6adf577000cfbaeb845f32" dependencies = [ "anyhow", "bech32", @@ -1846,8 +1869,9 @@ dependencies = [ [[package]] name = "snarkvm-console-program" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7340c6fb347209fe846765b1b2911c63f72c788615f6150c3c588c0b8195a410" dependencies = [ "enum-iterator", "enum_index", @@ -1868,8 +1892,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d66f03c46d92eaf59d18451fad067728e0a5e17618c2447cd82969294c0221" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-address", @@ -1883,8 +1908,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-address" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9cd4cd1f8c2f9129a25d51922a5b1ce6a79719202435c24579998b0e2794ee" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1894,16 +1920,18 @@ dependencies = [ [[package]] name = "snarkvm-console-types-boolean" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909a71996dd113a07e748d818145223af9893d4c2c45a9fc165b8426f97a0571" dependencies = [ "snarkvm-console-network-environment", ] [[package]] name = "snarkvm-console-types-field" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edf76e7ef6c508d01a8a1b2a1340262127eb48253984ac1aca98bdb4f43c662f" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1912,8 +1940,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-group" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223bcd81ed18834c042dcf077f71805f28fcb976549b35f8ca47b52f39fe317f" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1923,8 +1952,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-integers" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a392d380a382749b75225552ec27c86b5f33adea11dd7a1774c8927781aeca" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1934,8 +1964,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-scalar" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b7d745b3c27eee7dd4d3a8278341617c9aa10783c7919e3eb3efe7084e0853" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1945,8 +1976,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-string" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f1048223dc7839e19a2fb60666801fd0fefdcb5a5987394ffe7603f928bc45" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -1956,8 +1988,9 @@ dependencies = [ [[package]] name = "snarkvm-curves" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bbd49b827182dd51c3054ec04528ab4eebb61883f0e7d8efeeb53800f684e5" dependencies = [ "rand", "rayon", @@ -1970,8 +2003,9 @@ dependencies = [ [[package]] name = "snarkvm-fields" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942b47d900853fbebdb22cf609b7f2cef3e352032c07d11759ee22027d07e758" dependencies = [ "aleo-std", "anyhow", @@ -1987,8 +2021,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-authority" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b24b9e54725e0eb3d3dea16159a0e5871fc5a48a7a93ad30c45914a87509d1" dependencies = [ "anyhow", "rand", @@ -1999,8 +2034,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-block" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec668a611a2e15e927943914253bfd3b9a6f709fd56a8f40bc75046cd07d77e" dependencies = [ "indexmap", "rayon", @@ -2019,8 +2055,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-committee" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a6cb54ae8d7dc233164123c0be74786c746ed07a525d3c5b3ad1df368560f8" dependencies = [ "indexmap", "rayon", @@ -2031,8 +2068,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-certificate" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550fbc76ff67e050f480751fc52930015e6ccaeea852ad8eddb5ec595e804375" dependencies = [ "indexmap", "rayon", @@ -2044,8 +2082,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-header" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0451c6227e6cb15688129fa24cf0f5a49120e0e26c89e61fbfcd8a9c0ba4ad40" dependencies = [ "indexmap", "rayon", @@ -2056,8 +2095,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-data" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee5a38e42c52112d9ceb2331ded74d4e68040979471a5a1d9041165e83e43291" dependencies = [ "bytes", "serde_json", @@ -2066,8 +2106,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-subdag" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbcd2d0dbc7dbe837dfb30de786ac341dd88afdb973b3a2a4c076a39d414e2e" dependencies = [ "indexmap", "rayon", @@ -2081,8 +2122,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-transmission-id" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e348c47cb47148043240680a89839210d6bdfbcd8fcffe4df7b7b99e25411d" dependencies = [ "snarkvm-console", "snarkvm-ledger-puzzle", @@ -2090,8 +2132,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-puzzle" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7251252c6b6d48ccdfeee38f63127f01bcd1da1edcc8e73f71de5f33719cb059" dependencies = [ "aleo-std", "anyhow", @@ -2110,8 +2153,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-puzzle-epoch" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1e0de23eabafe1380f54556a694c1a9a3574767fb4dd49c9c15975641a30e66" dependencies = [ "aleo-std", "anyhow", @@ -2131,8 +2175,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-query" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d0a7c91e30017cf69a2f8d1636ea682b54a674c555d3d23b9f74d0cf376482" dependencies = [ "async-trait", "reqwest", @@ -2144,8 +2189,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger-store" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184854df19e419bc4f363713f1c5ba73248fa98e184edec881aba77b397b77cd" dependencies = [ "aleo-std-storage", "anyhow", @@ -2167,8 +2213,9 @@ dependencies = [ [[package]] name = "snarkvm-parameters" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73c31bcc6cc152a8a9fc6992e32edba8f885b736d9ed67c4d9eead979e51d009" dependencies = [ "aleo-std", "anyhow", @@ -2195,8 +2242,9 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01171b6362e9b10f0a1b19364e86758c79f5469227d25ad677a37d675c31f172" dependencies = [ "aleo-std", "anyhow", @@ -2226,8 +2274,9 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-process" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6576f8a4e376780da7a047a8424ddcc3d991192802fc4e333af275aa90c9bf37" dependencies = [ "aleo-std", "colored", @@ -2250,8 +2299,9 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-program" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baea91c7ea8d8584bbe632340dd90cc56b4cc2127025981c298113d227bb587a" dependencies = [ "indexmap", "paste", @@ -2264,8 +2314,9 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-snark" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fe2b943d82c5361917cbac96fbf8060f030ae0555efc9cfe0bd13e1e45680cb" dependencies = [ "bincode", "once_cell", @@ -2277,8 +2328,9 @@ dependencies = [ [[package]] name = "snarkvm-utilities" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c395af67af40e35bb22a1996acbc01119ba129199f6e2b498bf91706754c98" dependencies = [ "aleo-std", "anyhow", @@ -2298,8 +2350,9 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "857e98d8e92501c0c6a8102e3f2714a550bf2455977d05c25a10a45b5f8ce047" dependencies = [ "proc-macro2", "quote 1.0.36", @@ -2308,8 +2361,9 @@ dependencies = [ [[package]] name = "snarkvm-wasm" -version = "0.16.19" -source = "git+https://github.com/AleoNet/snarkVM.git?rev=3d42aa04a058cd5f46a1880b421313e1c04a63dc#3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5981943d156ed0fc8e4a4c9a7e0e263335069d345b5904d24386787ee257581" dependencies = [ "getrandom", "snarkvm-circuit-network", diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index 453a2cac4..d1386f2dc 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aleo-wasm" -version = "0.7.0" +version = "0.7.1" authors = [ "The Provable Team" ] description = "WebAssembly based toolkit for developing zero-knowledge applications with Aleo" homepage = "https://provable.com" @@ -22,49 +22,33 @@ crate-type = [ "cdylib", "rlib" ] doctest = false [dependencies.snarkvm-circuit-network] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" [dependencies.snarkvm-console] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "wasm" ] [dependencies.snarkvm-ledger-block] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "wasm" ] [dependencies.snarkvm-ledger-query] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "async", "wasm" ] [dependencies.snarkvm-ledger-store] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" [dependencies.snarkvm-parameters] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "wasm" ] [dependencies.snarkvm-synthesizer] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "async", "wasm" ] [dependencies.snarkvm-wasm] -version = "0.16.19" -git = "https://github.com/AleoNet/snarkVM.git" -rev = "3d42aa04a058cd5f46a1880b421313e1c04a63dc" +version = "1.1.0" features = [ "console", "fields", "utilities" ] [dependencies.anyhow] diff --git a/wasm/build.js b/wasm/build.js index 78dc78441..53f9e33a0 100644 --- a/wasm/build.js +++ b/wasm/build.js @@ -55,21 +55,26 @@ async function buildJS(network) { const { initThreadPool: wasmInitThreadPool, Address, + Ciphertext, Execution, ExecutionResponse, Field, + Group, Metadata, OfflineQuery, + Plaintext, Private, PrivateKey, PrivateKeyCiphertext, Program, - ProvingKey, + ProvingKey, RecordCiphertext, RecordPlaintext, ProgramManager, + Scalar, Signature, Transaction, + Transition, ViewKey, VerifyingKey, verifyFunctionExecution, @@ -92,9 +97,11 @@ async function initThreadPool(threads) { export { initThreadPool, Address, + Ciphertext, Execution, ExecutionResponse, Field, + Group, Metadata, OfflineQuery, PrivateKey, @@ -103,9 +110,12 @@ export { ProvingKey, RecordCiphertext, RecordPlaintext, + Plaintext, ProgramManager, Signature, + Scalar, Transaction, + Transition, ViewKey, VerifyingKey, verifyFunctionExecution, @@ -193,11 +203,14 @@ export function initThreadPool(threads?: number): Promise<void>; export { Address, + Ciphertext, Execution, ExecutionResponse, Field, + Group, Metadata, OfflineQuery, + Plaintext, PrivateKey, PrivateKeyCiphertext, Program, @@ -205,8 +218,10 @@ export { RecordCiphertext, RecordPlaintext, ProgramManager, + Scalar, Signature, Transaction, + Transition, ViewKey, VerifyingKey, verifyFunctionExecution, diff --git a/wasm/src/ledger/transaction.rs b/wasm/src/ledger/transaction.rs index fefb07d5b..02896f293 100644 --- a/wasm/src/ledger/transaction.rs +++ b/wasm/src/ledger/transaction.rs @@ -84,6 +84,7 @@ impl Transaction { /// Returns true if the transaction contains the given serial number. /// /// @param {boolean} True if the transaction contains the given serial number. + #[wasm_bindgen(js_name = constainsSerialNumber)] pub fn contains_serial_number(&self, serial_number: &Field) -> bool { self.0.contains_serial_number(serial_number) } @@ -91,21 +92,25 @@ impl Transaction { /// Returns true if the transaction contains the given commitment. /// /// @param {boolean} True if the transaction contains the given commitment. + #[wasm_bindgen(js_name = constainsCommitment)] pub fn contains_commitment(&self, commitment: &Field) -> bool { self.0.contains_commitment(commitment) } /// Find a record in the transaction by the record's commitment. + #[wasm_bindgen(js_name = findRecord)] pub fn find_record(&self, commitment: &Field) -> Option<RecordCiphertext> { self.0.find_record(commitment).map(|record_ciphertext| RecordCiphertext::from(record_ciphertext)) } /// Returns the transaction's base fee. + #[wasm_bindgen(js_name = baseFeeAmount)] pub fn base_fee_amount(&self) -> u64 { self.0.base_fee_amount().map(|fee| *fee).unwrap_or(0) } /// Returns the transaction's total fee. + #[wasm_bindgen(js_name = feeAmount)] pub fn fee_amount(&self) -> u64 { self.0.fee_amount().map(|fee| *fee).unwrap_or(0) } @@ -113,6 +118,7 @@ impl Transaction { /// Returns the transaction's priority fee. /// /// returns {bigint} The transaction's priority fee. + #[wasm_bindgen(js_name = priorityFeeAmount)] pub fn priority_fee_amount(&self) -> u64 { self.0.priority_fee_amount().map(|fee| *fee).unwrap_or(0) } @@ -120,6 +126,7 @@ impl Transaction { /// Returns true if the transaction is a deployment transaction. /// /// @returns {boolean} True if the transaction is a deployment transaction + #[wasm_bindgen(js_name = isDeploy)] pub fn is_deploy(&self) -> bool { self.0.is_deploy() } @@ -127,6 +134,7 @@ impl Transaction { /// Returns true if the transaction is an execution transaction. /// /// @returns {boolean} True if the transaction is an execution transaction + #[wasm_bindgen(js_name = isExecute)] pub fn is_execute(&self) -> bool { self.0.is_execute() } @@ -134,6 +142,7 @@ impl Transaction { /// Returns true if the transaction is a fee transaction. /// /// @returns {boolean} True if the transaction is a fee transaction + #[wasm_bindgen(js_name = isFee)] pub fn is_fee(&self) -> bool { self.0.is_fee() } @@ -143,6 +152,7 @@ impl Transaction { /// @param {ViewKey} view_key View key used to decrypt the ciphertext /// /// @returns {Array<RecordPlaintext>} Array of record plaintext objects + #[wasm_bindgen(js_name = ownedRecords)] pub fn owned_records(&self, view_key: &ViewKey) -> Array { self.0 .records() @@ -199,7 +209,7 @@ impl Transaction { object! { "programId" : transition.program_id().to_string(), "functionName" : transition.function_name().to_string(), - "transitionID" : transition.id().to_string(), + "id" : transition.id().to_string(), "inputs" : inputs, "outputs" : outputs, "tpk" : if convert_to_js { JsValue::from_str(&transition.tpk().to_string()) } else { JsValue::from(Group::from(transition.tpk())) }, @@ -209,7 +219,7 @@ impl Transaction { }).collect::<Array>(); JsValue::from(transitions) } else { - JsValue::NULL + JsValue::from(Array::new()) }; // If the transaction is a deployment, summarize the deployment. @@ -217,7 +227,7 @@ impl Transaction { let functions = deployment.verifying_keys().iter().map(|(function_name, (verifying_key, _))| { // Create the initial function object. object! { - "functionName" : function_name.to_string(), + "name" : function_name.to_string(), "constraints" : verifying_key.circuit_info.num_constraints as u32, "variables" : verifying_key.num_variables() as u32, "verifyingKey": if convert_to_js { JsValue::from_str(&verifying_key.to_string()) } else { JsValue::from(VerifyingKey::from(verifying_key)) }, @@ -233,8 +243,8 @@ impl Transaction { }; object! { - "transactionId" : self.transaction_id().to_string(), - "transactionType" : self.transaction_type().to_string(), + "id" : self.id().to_string(), + "type" : self.transaction_type().to_string(), "fee" : *self.0.fee_amount().unwrap_or(U64Native::new(0)), "baseFee" : *self.0.base_fee_amount().unwrap_or(U64Native::new(0)), "priorityFee" : *self.0.priority_fee_amount().unwrap_or(U64Native::new(0)), @@ -250,8 +260,7 @@ impl Transaction { /// value can be used to lookup the transaction data on-chain. /// /// @returns {string} TransactionId - #[wasm_bindgen(js_name = transactionId)] - pub fn transaction_id(&self) -> String { + pub fn id(&self) -> String { self.0.id().to_string() } @@ -330,7 +339,7 @@ mod tests { #[wasm_bindgen_test] fn test_transaction_string_constructor_and_accessor_methods() { let transaction = Transaction::from_string(TRANSACTION_STRING).unwrap(); - let transaction_id = transaction.transaction_id(); + let transaction_id = transaction.id(); let transaction_type = transaction.transaction_type(); let recovered_string = transaction.to_string(); assert_eq!(transaction_id, TRANSACTION_ID); @@ -372,10 +381,9 @@ mod tests { fn test_transaction_summary_provides_expected_values() { let transaction = Transaction::from_string(TRANSACTION_STRING).unwrap(); let summary = transaction.summary(true); - let transaction_id = Reflect::get(&summary, &JsValue::from_str("transactionId")).unwrap().as_string().unwrap(); + let transaction_id = Reflect::get(&summary, &JsValue::from_str("id")).unwrap().as_string().unwrap(); assert_eq!(transaction_id, TRANSACTION_ID); - let transaction_type = - Reflect::get(&summary, &JsValue::from_str("transactionType")).unwrap().as_string().unwrap(); + let transaction_type = Reflect::get(&summary, &JsValue::from_str("type")).unwrap().as_string().unwrap(); assert_eq!(transaction_type, "execute"); assert!(Reflect::get(&summary, &JsValue::from_str("baseFee")).unwrap().is_bigint()); assert!(Reflect::get(&summary, &JsValue::from_str("fee")).unwrap().is_bigint()); @@ -411,8 +419,21 @@ mod tests { // Check inputs. let inputs = Array::from(&Reflect::get(&transition, &JsValue::from_str("inputs")).unwrap()).to_vec(); assert_eq!(inputs.len(), 2); - assert_eq!(inputs[0].as_string().unwrap(), "aleo1nde82xqshcyjq2r3qjel7pphk3zfs928w5dqhuc6g2ywquef7srsmrpjgr"); - assert!(inputs[1].is_bigint()); + assert_eq!(Reflect::get(&inputs[0], &JsValue::from_str("type")).unwrap().as_string().unwrap(), "public"); + assert_eq!( + Reflect::get(&inputs[0], &JsValue::from_str("id")).unwrap().as_string().unwrap(), + "4751135245718319934677221244600857477393936843410399077399851644790898074286field" + ); + assert_eq!( + Reflect::get(&inputs[0], &JsValue::from_str("value")).unwrap().as_string().unwrap(), + "aleo1nde82xqshcyjq2r3qjel7pphk3zfs928w5dqhuc6g2ywquef7srsmrpjgr" + ); + assert_eq!(Reflect::get(&inputs[1], &JsValue::from_str("type")).unwrap().as_string().unwrap(), "public"); + assert_eq!( + Reflect::get(&inputs[1], &JsValue::from_str("id")).unwrap().as_string().unwrap(), + "1879683531456735826402444579986765299787803396630464445477045553705002014280field" + ); + assert!(Reflect::get(&inputs[1], &JsValue::from_str("value")).unwrap().is_bigint()); // Check outputs and future arguments. let outputs = Array::from(&Reflect::get(&transition, &JsValue::from_str("outputs")).unwrap()).to_vec(); @@ -469,10 +490,10 @@ mod tests { // Check inputs. let inputs = Array::from(&Reflect::get(&transition, &JsValue::from_str("inputs")).unwrap()).to_vec(); assert_eq!(inputs.len(), 3); - assert!(inputs[0].is_bigint()); - assert!(inputs[1].is_bigint()); + assert!(Reflect::get(&inputs[0], &JsValue::from_str("value")).unwrap().is_bigint()); + assert!(Reflect::get(&inputs[1], &JsValue::from_str("value")).unwrap().is_bigint()); assert_eq!( - inputs[2].as_string().unwrap(), + Reflect::get(&inputs[2], &JsValue::from_str("value")).unwrap().as_string().unwrap(), "4485998228444633245424449325268791226620568930423610568011053349827561756688field" ); diff --git a/wasm/src/ledger/transition.rs b/wasm/src/ledger/transition.rs index 4f1884f59..8b6dd450c 100644 --- a/wasm/src/ledger/transition.rs +++ b/wasm/src/ledger/transition.rs @@ -96,6 +96,7 @@ impl Transition { /// Returns true if the transition contains the given commitment. /// /// @param {boolean} True if the transition contains the given commitment. + #[wasm_bindgen(js_name = containsCommitment)] pub fn contains_commitment(&self, commitment: &Field) -> bool { self.0.contains_commitment(commitment) } @@ -105,11 +106,13 @@ impl Transition { /// @param {Field} serial_number The serial number to check for /// /// @returns {bool} True if the transition contains a serial number, false otherwise + #[wasm_bindgen(js_name = containsSerialNumber)] pub fn contains_serial_number(&self, serial_number: &Field) -> bool { self.0.contains_serial_number(serial_number) } /// Find a record in the transition by the record's commitment. + #[wasm_bindgen(js_name = findRecord)] pub fn find_record(&self, commitment: &Field) -> Option<RecordCiphertext> { self.0.find_record(commitment).map(|record_ciphertext| RecordCiphertext::from(record_ciphertext)) } @@ -119,6 +122,7 @@ impl Transition { /// @param {ViewKey} view_key The view key of the record owner. /// /// @returns {Array<RecordPlaintext>} Array of record plaintext objects + #[wasm_bindgen(js_name = ownedRecords)] pub fn owned_records(&self, view_key: &ViewKey) -> Array { self.0 .records() @@ -323,11 +327,16 @@ mod tests { assert_eq!(inputs.length(), 2); assert_eq!(Reflect::get(&input_1, &JsValue::from_str("type")).unwrap().as_string().unwrap(), "record"); assert_eq!( - Reflect::get(&input_1, &JsValue::from_str("serialNumber")).unwrap().as_string().unwrap(), + Reflect::get(&input_1, &JsValue::from_str("id")).unwrap().as_string().unwrap(), INPUT_RECORD_SERIAL_NUMBER ); assert_eq!(Reflect::get(&input_1, &JsValue::from_str("tag")).unwrap().as_string().unwrap(), INPUT_RECORD_TAG); - assert!(input_2.is_bigint()); + assert_eq!( + Reflect::get(&input_2, &JsValue::from_str("id")).unwrap().as_string().unwrap(), + "4155661860779318196369465902681808025430867777096367712868886959018716227815field" + ); + assert_eq!(Reflect::get(&input_2, &JsValue::from_str("type")).unwrap().as_string().unwrap(), "public"); + assert!(Reflect::get(&input_2, &JsValue::from_str("value")).unwrap().is_bigint()); } #[wasm_bindgen_test] @@ -343,20 +352,18 @@ mod tests { // Ensure the record output is correct. assert_eq!(Reflect::get(&output_1, &JsValue::from_str("type")).unwrap().as_string().unwrap(), "record"); assert_eq!( - Reflect::get(&output_1, &JsValue::from_str("commitment")).unwrap().as_string().unwrap(), + Reflect::get(&output_1, &JsValue::from_str("id")).unwrap().as_string().unwrap(), OUTPUT_RECORD_COMMITMENT ); assert_eq!( Reflect::get(&output_1, &JsValue::from_str("checksum")).unwrap().as_string().unwrap(), OUTPUT_CHECKSUM ); - assert_eq!( - Reflect::get(&output_1, &JsValue::from_str("recordCiphertext")).unwrap().as_string().unwrap(), - OUTPUT_RECORD - ); + assert_eq!(Reflect::get(&output_1, &JsValue::from_str("value")).unwrap().as_string().unwrap(), OUTPUT_RECORD); // Ensure the future output is correct. let arguments = Array::from(&Reflect::get(&output_2, &JsValue::from_str("arguments")).unwrap()); + assert_eq!(Reflect::get(&output_2, &JsValue::from_str("type")).unwrap().as_string().unwrap(), "future"); assert_eq!( Reflect::get(&output_2, &JsValue::from_str("programId")).unwrap().as_string().unwrap(), diff --git a/wasm/src/programs/data/helpers/future.rs b/wasm/src/programs/data/helpers/future.rs index 6cd35dd2e..ec5249bd9 100644 --- a/wasm/src/programs/data/helpers/future.rs +++ b/wasm/src/programs/data/helpers/future.rs @@ -18,19 +18,16 @@ use crate::{ object, plaintext_to_js_value, types::native::{ArgumentNative, FutureNative}, + Field, Plaintext, }; -use js_sys::{Array, JsString, Reflect}; +use crate::types::native::FieldNative; +use js_sys::{Array, Reflect}; use wasm_bindgen::JsValue; /// Convert a future to a javascript value. -pub fn future_to_js_value(argument: &FutureNative, convert_to_js: bool) -> JsValue { - let future_object = object! { - "type" : "future", - "programId" : argument.program_id().to_string(), - "functionName" : argument.function_name().to_string(), - }; +pub fn future_to_js_value(argument: &FutureNative, convert_to_js: bool, id: &FieldNative) -> JsValue { let arguments = argument .arguments() .iter() @@ -42,9 +39,15 @@ pub fn future_to_js_value(argument: &FutureNative, convert_to_js: bool) -> JsVal JsValue::from(Plaintext::from(plaintext)) } } - ArgumentNative::Future(future) => future_to_js_value(future, convert_to_js), + ArgumentNative::Future(future) => future_to_js_value(future, convert_to_js, id), }) .collect::<Array>(); - Reflect::set(&future_object, &JsString::from("arguments"), &JsValue::from(&arguments)).unwrap(); + let future_object = object! { + "type" : "future", + "id" : if convert_to_js { JsValue::from(&id.to_string()) } else { JsValue::from(Field::from(id)) }, + "programId" : argument.program_id().to_string(), + "functionName" : argument.function_name().to_string(), + "arguments" : arguments, + }; JsValue::from(future_object) } diff --git a/wasm/src/programs/data/helpers/input.rs b/wasm/src/programs/data/helpers/input.rs index 2f928b559..fab5c1bfa 100644 --- a/wasm/src/programs/data/helpers/input.rs +++ b/wasm/src/programs/data/helpers/input.rs @@ -16,27 +16,39 @@ use crate::{object, plaintext_to_js_value, types::native::InputNative, Ciphertext, Field, Plaintext}; -use js_sys::{JsString, Reflect}; +use js_sys::Reflect; use wasm_bindgen::JsValue; pub fn input_to_js_value(input: &InputNative, convert_to_js: bool) -> JsValue { match input { - InputNative::Constant(_, plaintext) => { - if let Some(plaintext) = plaintext { + InputNative::Constant(id, plaintext) => { + let value = if let Some(plaintext) = plaintext { if convert_to_js { plaintext_to_js_value(plaintext) } else { JsValue::from(Plaintext::from(plaintext)) } } else { JsValue::NULL - } + }; + let constant_input = object! { + "type": "constant", + "id": if convert_to_js { JsValue::from(&id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value": value, + }; + JsValue::from(constant_input) } - InputNative::Public(_, plaintext) => { - if let Some(plaintext) = plaintext { + InputNative::Public(id, plaintext) => { + let value = if let Some(plaintext) = plaintext { if convert_to_js { plaintext_to_js_value(plaintext) } else { JsValue::from(Plaintext::from(plaintext)) } } else { JsValue::NULL - } + }; + let public_input = object! { + "type" : "public", + "id" : if convert_to_js { JsValue::from(&id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value" : value, + }; + JsValue::from(public_input) } - InputNative::Private(_, ciphertext) => { - if let Some(ciphertext) = ciphertext { + InputNative::Private(id, ciphertext) => { + let value = if let Some(ciphertext) = ciphertext { if convert_to_js { JsValue::from_str(&ciphertext.to_string()) } else { @@ -44,42 +56,27 @@ pub fn input_to_js_value(input: &InputNative, convert_to_js: bool) -> JsValue { } } else { JsValue::NULL - } + }; + let private_input = object! { + "type" : "private", + "id" : if convert_to_js { JsValue::from(&id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value" : value, + }; + JsValue::from(private_input) } InputNative::Record(serial_number, tag) => { let record = object! { "type": "record", + "id": if convert_to_js { JsValue::from(serial_number.to_string()) } else { JsValue::from(Field::from(serial_number)) }, + "tag" : if convert_to_js { JsValue::from(Field::from(tag).to_string()) } else { JsValue::from(Field::from(tag)) }, }; - if convert_to_js { - Reflect::set(&record, &JsString::from("serialNumber"), &JsValue::from(serial_number.to_string())) - .unwrap(); - Reflect::set(&record, &JsString::from("tag"), &JsValue::from(Field::from(tag).to_string())).unwrap(); - } else { - Reflect::set(&record, &JsString::from("serialNumber"), &JsValue::from(Field::from(serial_number))) - .unwrap(); - Reflect::set(&record, &JsString::from("tag"), &JsValue::from(Field::from(tag))).unwrap(); - } JsValue::from(record) } InputNative::ExternalRecord(input_commitment) => { let external_record = object! { - "type": "extneralRecord", + "type": "externalRecord", + "id" : if convert_to_js { JsValue::from(input_commitment.to_string()) } else { JsValue::from(Field::from(input_commitment)) }, }; - if convert_to_js { - Reflect::set( - &external_record, - &JsString::from("inputCommitment"), - &JsValue::from(input_commitment.to_string()), - ) - .unwrap(); - } else { - Reflect::set( - &external_record, - &JsString::from("inputCommitment"), - &JsValue::from(Field::from(input_commitment)), - ) - .unwrap(); - } JsValue::from(external_record) } } diff --git a/wasm/src/programs/data/helpers/output.rs b/wasm/src/programs/data/helpers/output.rs index 385cdd3cd..5a3ecc6da 100644 --- a/wasm/src/programs/data/helpers/output.rs +++ b/wasm/src/programs/data/helpers/output.rs @@ -25,27 +25,39 @@ use crate::{ RecordCiphertext, }; -use js_sys::{JsString, Object, Reflect}; +use js_sys::Reflect; use wasm_bindgen::JsValue; pub fn output_to_js_value(output: &OutputNative, convert_to_js: bool) -> JsValue { let js_value = match output { - OutputNative::Constant(_, plaintext) => { - if let Some(plaintext) = plaintext { + OutputNative::Constant(id, plaintext) => { + let value = if let Some(plaintext) = plaintext { if convert_to_js { plaintext_to_js_value(plaintext) } else { JsValue::from(Plaintext::from(plaintext)) } } else { JsValue::NULL - } + }; + let constant = object! { + "type" : "constant", + "id" : if convert_to_js { JsValue::from(id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value" : value, + }; + JsValue::from(constant) } - OutputNative::Public(_, plaintext) => { - if let Some(plaintext) = plaintext { + OutputNative::Public(id, plaintext) => { + let value = if let Some(plaintext) = plaintext { if convert_to_js { plaintext_to_js_value(plaintext) } else { JsValue::from(Plaintext::from(plaintext)) } } else { JsValue::NULL - } + }; + let public_output = object! { + "type" : "constant", + "id" : if convert_to_js { JsValue::from(id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value" : value, + }; + JsValue::from(public_output) } - OutputNative::Private(_, ciphertext) => { - if let Some(ciphertext) = ciphertext { + OutputNative::Private(id, ciphertext) => { + let value = if let Some(ciphertext) = ciphertext { if convert_to_js { JsValue::from_str(&ciphertext.to_string()) } else { @@ -53,66 +65,43 @@ pub fn output_to_js_value(output: &OutputNative, convert_to_js: bool) -> JsValue } } else { JsValue::NULL - } + }; + let private_output = object! { + "type" : "constant", + "id" : if convert_to_js { JsValue::from(id.to_string()) } else { JsValue::from(Field::from(id)) }, + "value" : value, + }; + JsValue::from(private_output) } OutputNative::Record(commitment, checksum, record_ciphertext) => { - // Create a record object. + let value = if let Some(record_ciphertext) = record_ciphertext { + if convert_to_js { + JsValue::from(record_ciphertext.to_string()) + } else { + JsValue::from(RecordCiphertext::from(record_ciphertext)) + } + } else { + JsValue::NULL + }; let record = object! { "type": "record", + "id": if convert_to_js { JsValue::from(commitment.to_string()) } else { JsValue::from(Field::from(commitment)) }, + "checksum": if convert_to_js { JsValue::from(checksum.to_string()) } else { JsValue::from(Field::from(checksum)) }, + "value" : value, }; - - // Create a record object. - if convert_to_js { - Reflect::set(&record, &JsString::from("commitment"), &JsValue::from(commitment.to_string())).unwrap(); - Reflect::set(&record, &JsString::from("checksum"), &JsValue::from(checksum.to_string())).unwrap(); - if let Some(record_ciphertext) = record_ciphertext { - Reflect::set( - &record, - &JsString::from("recordCiphertext"), - &JsValue::from(record_ciphertext.to_string()), - ) - .unwrap(); - } - } else { - Reflect::set(&record, &JsString::from("commitment"), &JsValue::from(Field::from(commitment))).unwrap(); - Reflect::set(&record, &JsString::from("checksum"), &JsValue::from(Field::from(checksum))).unwrap(); - if let Some(record_ciphertext) = record_ciphertext { - Reflect::set( - &record, - &JsString::from("recordCiphertext"), - &JsValue::from(RecordCiphertext::from(record_ciphertext)), - ) - .unwrap(); - } - } - JsValue::from(&record) + JsValue::from(record) } OutputNative::ExternalRecord(output_commitment) => { - let external_record_object = Object::new(); - Reflect::set(&external_record_object, &JsString::from("type"), &JsString::from("externalRecord")).unwrap(); - if convert_to_js { - Reflect::set( - &external_record_object, - &JsString::from("outputCommitment"), - &JsString::from(output_commitment.to_string()), - ) - .unwrap(); - } else { - Reflect::set( - &external_record_object, - &JsString::from("outputCommitment"), - &JsValue::from(Field::from(output_commitment)), - ) - .unwrap(); - } + let external_record_object = object! { + "type": "external_record", + "id": if convert_to_js { JsValue::from(output_commitment.to_string()) } else { JsValue::from(Field::from(output_commitment)) }, + }; JsValue::from(external_record_object) } - OutputNative::Future(_, future) => { - if let Some(future) = future { - future_to_js_value(future, convert_to_js) - } else { - JsValue::NULL - } + OutputNative::Future(id, future) => { + let value = + if let Some(future) = future { future_to_js_value(future, convert_to_js, id) } else { JsValue::NULL }; + JsValue::from(&value) } }; js_value diff --git a/wasm/src/programs/data/plaintext.rs b/wasm/src/programs/data/plaintext.rs index 0d1cb52bc..aff5ebdaa 100644 --- a/wasm/src/programs/data/plaintext.rs +++ b/wasm/src/programs/data/plaintext.rs @@ -72,6 +72,7 @@ impl Plaintext { } /// Encrypt a plaintext with a transition view key. + #[wasm_bindgen(js_name = encryptSymmetric)] pub fn encrypt_symmetric(&self, transition_view_key: &Field) -> Result<Ciphertext, String> { self.0.encrypt_symmetric(**transition_view_key).map_err(|e| e.to_string()).map(Ciphertext::from) } diff --git a/wasm/src/programs/manager/execute.rs b/wasm/src/programs/manager/execute.rs index b24d8f511..4ca185633 100644 --- a/wasm/src/programs/manager/execute.rs +++ b/wasm/src/programs/manager/execute.rs @@ -15,7 +15,6 @@ // along with the Aleo SDK library. If not, see <https://www.gnu.org/licenses/>. use super::*; -use core::ops::Add; use crate::{ execute_fee, @@ -31,14 +30,19 @@ use crate::{ use crate::types::native::{ CurrentAleo, + CurrentNetwork, IdentifierNative, ProcessNative, ProgramNative, RecordPlaintextNative, TransactionNative, }; +use core::ops::Add; use js_sys::{Array, Object}; use rand::{rngs::StdRng, SeedableRng}; +use snarkvm_console::prelude::Network; +use snarkvm_ledger_query::QueryTrait; +use snarkvm_synthesizer::prelude::cost_in_microcredits_v1; use std::str::FromStr; #[wasm_bindgen] @@ -284,12 +288,17 @@ impl ProgramManager { let node_url = url.as_deref().unwrap_or(DEFAULT_URL); let program = ProgramNative::from_str(program).map_err(|err| err.to_string())?; let locator = program.id().to_string().add("/").add(function); - if let Some(offline_query) = offline_query { + + let block_height = if let Some(offline_query) = offline_query { + let block_height = offline_query.current_block_height().map_err(|e| e.to_string())?; trace.prepare_async(offline_query).await.map_err(|err| err.to_string())?; + block_height } else { let query = QueryNative::from(node_url); + let block_height = query.current_block_height_async().await.map_err(|e| e.to_string())?; trace.prepare_async(query).await.map_err(|err| err.to_string())?; - } + block_height + }; let execution = trace.prove_execution::<CurrentAleo, _>(&locator, rng).map_err(|e| e.to_string())?; // Get the storage cost in bytes for the program execution @@ -306,7 +315,11 @@ impl ProgramManager { let stack = process.get_stack(program_id).map_err(|e| e.to_string())?; // Calculate the finalize cost for the function identified in the transition - let cost = cost_in_microcredits(stack, function_name).map_err(|e| e.to_string())?; + let cost = if block_height >= CurrentNetwork::CONSENSUS_V2_HEIGHT { + cost_in_microcredits_v2(stack, function_name).map_err(|e| e.to_string())? + } else { + cost_in_microcredits_v1(stack, function_name).map_err(|e| e.to_string())? + }; // Accumulate the finalize cost. finalize_cost = finalize_cost @@ -339,6 +352,6 @@ impl ProgramManager { let stack = process.get_stack(program.id()).map_err(|e| e.to_string())?; - cost_in_microcredits(stack, &function_id).map_err(|e| e.to_string()) + cost_in_microcredits_v2(stack, &function_id).map_err(|e| e.to_string()) } } diff --git a/wasm/src/programs/manager/mod.rs b/wasm/src/programs/manager/mod.rs index 7fcd6457c..d719692ca 100644 --- a/wasm/src/programs/manager/mod.rs +++ b/wasm/src/programs/manager/mod.rs @@ -25,7 +25,7 @@ const DEFAULT_URL: &str = "https://api.explorer.provable.com/v1"; use crate::{KeyPair, PrivateKey, ProvingKey, RecordPlaintext, VerifyingKey}; use crate::types::native::{ - cost_in_microcredits, + cost_in_microcredits_v2, deployment_cost, IdentifierNative, ProcessNative, diff --git a/wasm/src/programs/offline_query.rs b/wasm/src/programs/offline_query.rs index 14f3e4cc9..ad85f0092 100644 --- a/wasm/src/programs/offline_query.rs +++ b/wasm/src/programs/offline_query.rs @@ -31,6 +31,7 @@ use std::str::FromStr; #[wasm_bindgen] #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct OfflineQuery { + block_height: u32, state_paths: IndexMap<Field<CurrentNetwork>, StatePath<CurrentNetwork>>, state_root: <CurrentNetwork as Network>::StateRoot, } @@ -39,9 +40,15 @@ pub struct OfflineQuery { impl OfflineQuery { /// Creates a new offline query object. The state root is required to be passed in as a string #[wasm_bindgen(constructor)] - pub fn new(state_root: &str) -> Result<OfflineQuery, String> { + pub fn new(block_height: u32, state_root: &str) -> Result<OfflineQuery, String> { let state_root = <CurrentNetwork as Network>::StateRoot::from_str(state_root).map_err(|e| e.to_string())?; - Ok(Self { state_paths: IndexMap::new(), state_root }) + Ok(Self { block_height, state_paths: IndexMap::new(), state_root }) + } + + /// Add a new block height to the offline query object. + #[wasm_bindgen(js_name = "addBlockHeight")] + pub fn add_block_height(&mut self, block_height: u32) { + self.block_height = block_height; } /// Add a new state path to the offline query object. @@ -93,6 +100,14 @@ impl QueryTrait<CurrentNetwork> for OfflineQuery { ) -> anyhow::Result<StatePath<CurrentNetwork>> { self.state_paths.get(commitment).cloned().ok_or(anyhow!("State path not found for commitment")) } + + fn current_block_height(&self) -> anyhow::Result<u32> { + Ok(self.block_height) + } + + async fn current_block_height_async(&self) -> anyhow::Result<u32> { + Ok(self.block_height) + } } #[cfg(test)] @@ -101,15 +116,14 @@ mod tests { use wasm_bindgen_test::*; - const OFFLINE_QUERY: &str = - r#"{"state_paths":{},"state_root":"sr1wjueje6hy86yw9j4lhl7jwvhjxwunw34paj4k3cn2wm5h5r2syfqd83yw4"}"#; + const OFFLINE_QUERY: &str = r#"{"block_height":0,"state_paths":{},"state_root":"sr1wjueje6hy86yw9j4lhl7jwvhjxwunw34paj4k3cn2wm5h5r2syfqd83yw4"}"#; //const RECORD: &str = "{ owner: aleo1rlwt9w0fl242h40w454m68vttd6vm4lmetu5r57unm5g354y9yzsyexf0y.private, microcredits: 1000000u64.private, _nonce: 2899260364216345893364017846447050369739821279831870104066405119445828210771group.public}"; //const RECORD_STATE_PATH: &str = "path1q96tnxt82uslg3ck2h7ll6fej7gemjd6x58k2k68zdfmwj7sd2q39u24qgqqqqqqqz8vhmupdu4wg3cv08ul4sjlz6je764cznh6ye9qkuc57272er7qzzy3nhhnyfxkvfs2m8zplzsxq2ctf2u5edwp0yavvyxsz54c99qrfs9aay3vhyecmc8f560glgmqv9c0awkg3upuj9rtm5u8t36dyyz7jsksttvfdkd75znvh6h83lqpq6q0eclym87t8ra2days24ew5racm54fffl3z4u2c29tzwykys7plxmct7khyuddgh6268ywgzyfzxe4uqm5svma27ptqccznezwmkj0vcpma3e9vu5lun96knvf5qus44sz5093p5wcdxwkjjr356knt65wjpnzpek2ad789req5e67rqqwrln54hlvhefl2xg36g6n2dn06k6l5jwn3y8xtlfg60wcr5huzvxluvc62x7sx74rpvjldq67v7fmtj0n3mvmczqg5dunz8aa7dumzpkehlddjk7gpjcn0fselmwx08ggf0vtfr4lvr6mpjycgtvfres5qwsgsu25xd27p23f4czqalhf3fhyvg4evwa2u4y27f2q59khvhjsfkqrr67gkw23s47vrmql5q0uk8cp63dpr4ttdehtq8rls0zmj2qvtns3uqeg2fann8e777nhmsddggxn3x67203309kngauujtuw0g8436902ggxze9cfprv8nh8n265phfls95ud9lfzwnvj80let33cpt2x5c5avy0czx3m5vv3ra8r0cw2f2e22dz72lzwkl3c5z8qfuupgs7xhpg42areg227kkflyhpn0cj260yhpeg567fkskljmv7zckqwz6rnk6l2yg7xpeyc3dy907wefjn5w35prnacapd4acn20qeldgwwmuev0d8t6tz02x2kv8qg9sxhakx6fmw5rd35fda735pchuct5gcg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyxqgy0ryzze4sllaq3hvhsk90h2qhx308xmfg63n740w6wjrk3qgl99r8gr9efj5yeddqdetk6n8cww9sawuhes4l5tan0zctne6n6px58ez93eujhk4qrreq9m0a9m54s93f4zvfa25k0a4w79gfl9grp5qsqqqqqqqqqqzr7mae3y6kkgqc3q3u2cte5vu328u7slgw9dnw9zu4x6uyvt5apykyzgq7g2pjq384shpxqvenrf2xzqpe6era69vcprljemjfu7rq98km83fkceft37tef3l5yd0u3d0vklnrre0xxus0x4cuy48dafs9q8a9z296cvk40q48sva0ndq7uhz4fk87xxrkku9x487afcaus0fpqqsqqqqqqqqqqzzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqgcnhf9dy704t3qcqwfz2zn23tyaax8uyfw9rflmz807edsq542qdss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfvfkqsgfjgwe874pq983afd72ptcv6hx664appmslfk2jptvjecdqqqqqqqqqqqqppq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyss2eafg236dqunyghdd0p7pttvey0765ry52vccqmlp859j9tgzgg9v7559gaxswfjytkkhslq44kvj8ld2pj29xvvqdlsn6zez45pyyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqgqgqqzk3ftj0dmy8gphrl85l8cfgrf8vpzdflzw7zu4ppfnxsn3vv2wqvatgjpp5234t647yyh37w3jmz37yyur5c5cg4rxgpwjecnpm2xsrceze3ptsf2gw50t0zznhzx0an9ezz8zfa37kxkw8ucw7f3gwlvqsyqqqqqqqqqqq0ylf8je3k7c464x6fpcur8s7ju93yum7kyq0p6hjkqdg24smwsz9vllufwczy2t0v3elfsv5ymkh8rp34acu9cc0rhjut7d9x684cqvyzk022z5wng8yez9mttc0s26mxfrlk4qe9znxxqxlcfapv326qjzpt849p28f5rjv3za44u8c9ddny3lm2svj3fnrqr0uy7skg4dqfpq4n6js4r56pexg3w667ruzkkejgla4gxfg5e3sph7z0gty2ksyqypq8m5dp6ejcmzg46vm4ng7xvxrya7dd4z5qam2afc8gclnkz50cgsgkwy6dt"; const STATE_ROOT: &str = "sr1wjueje6hy86yw9j4lhl7jwvhjxwunw34paj4k3cn2wm5h5r2syfqd83yw4"; #[wasm_bindgen_test] fn test_to_string_and_from_string() { - let offline_query = OfflineQuery::new(STATE_ROOT).unwrap(); + let offline_query = OfflineQuery::new(0, STATE_ROOT).unwrap(); assert_eq!(offline_query.to_string(), OFFLINE_QUERY); let offline_query_from_str = OfflineQuery::from_string(OFFLINE_QUERY).unwrap(); diff --git a/wasm/src/record/record_plaintext.rs b/wasm/src/record/record_plaintext.rs index 5a54ab464..5d52ac2e4 100644 --- a/wasm/src/record/record_plaintext.rs +++ b/wasm/src/record/record_plaintext.rs @@ -68,6 +68,7 @@ impl RecordPlaintext { Self::from_str(record).map_err(|_| "The record plaintext string provided was invalid".into()) } + #[wasm_bindgen(js_name = getMember)] pub fn get_member(&self, input: String) -> Result<Plaintext, String> { let entry = self .0 @@ -140,7 +141,7 @@ impl RecordPlaintext { /// assert(JSON.stringify(record_plaintext_object) == JSON.stringify(expected_object)); /// /// @returns {Object} Javascript object representation of the record - #[wasm_bindgen(js_name = "getRecordMembers")] + #[wasm_bindgen(js_name = "toJsObject")] pub fn to_js_object(&self) -> Result<Object, String> { record_to_js_object(&self.0) } diff --git a/wasm/src/types/field.rs b/wasm/src/types/field.rs index 5184d0d2d..84f85f7fb 100644 --- a/wasm/src/types/field.rs +++ b/wasm/src/types/field.rs @@ -18,13 +18,14 @@ use crate::{ types::native::{FieldNative, LiteralNative, PlaintextNative, Uniform}, Plaintext, }; -use snarkvm_console::prelude::{Double, One, Pow}; +use snarkvm_console::prelude::{Double, One, Pow, Zero}; use std::ops::Deref; use once_cell::sync::OnceCell; use std::str::FromStr; use wasm_bindgen::prelude::wasm_bindgen; +/// Field element. #[wasm_bindgen] #[derive(Clone, Debug, Eq, PartialEq)] pub struct Field(FieldNative); @@ -87,6 +88,11 @@ impl Field { Field(-self.0) } + /// Get the zero element of the field. + pub fn zero() -> Field { + Field(FieldNative::zero()) + } + /// Get the one element of the field. pub fn one() -> Field { Field(FieldNative::one()) @@ -96,6 +102,11 @@ impl Field { pub fn double(&self) -> Field { Field(self.0.double()) } + + /// Check if one field element equals another. + pub fn equals(&self, other: &Field) -> bool { + self.0 == FieldNative::from(other) + } } impl Deref for Field { diff --git a/wasm/src/types/group.rs b/wasm/src/types/group.rs index 51b99ffca..039dc5c7a 100644 --- a/wasm/src/types/group.rs +++ b/wasm/src/types/group.rs @@ -22,13 +22,13 @@ use crate::{ Field, Plaintext, }; -use snarkvm_console::prelude::Double; -use std::ops::Deref; +use snarkvm_console::prelude::{Double, Zero}; use once_cell::sync::OnceCell; -use std::str::FromStr; +use std::{ops::Deref, str::FromStr}; use wasm_bindgen::prelude::wasm_bindgen; +/// Elliptic curve element. #[wasm_bindgen] #[derive(Clone, Debug, Eq, PartialEq)] pub struct Group(GroupNative); @@ -77,6 +77,7 @@ impl Group { } /// Multiply a group element by a scalar element. + #[wasm_bindgen(js_name = scalarMultiply)] pub fn scalar_multiply(&self, scalar: &Scalar) -> Group { Group(self.0 * **scalar) } @@ -86,10 +87,26 @@ impl Group { Group(self.0.double()) } - /// Get the negation of the group element. - pub fn negate(&self) -> Group { + /// Get the inverse of the group element. This is the reflection of the point about the axis + /// of symmetry i.e. (x,y) -> (x, -y). + pub fn inverse(&self) -> Group { Group(-self.0) } + + /// Check if one group element equals another. + pub fn equals(&self, other: &Group) -> bool { + self.0 == GroupNative::from(other) + } + + /// Get the group identity element under the group operation (i.e. the point at infinity.) + pub fn zero() -> Group { + Group::from(GroupNative::zero()) + } + + /// Get the generator of the group. + pub fn generator() -> Group { + Group::from(GroupNative::generator()) + } } impl Deref for Group { diff --git a/wasm/src/types/native.rs b/wasm/src/types/native.rs index 88694464a..1e3459e73 100644 --- a/wasm/src/types/native.rs +++ b/wasm/src/types/native.rs @@ -41,7 +41,7 @@ use snarkvm_ledger_block::{Execution, Input, Output, Transaction, Transition}; pub use snarkvm_ledger_query::Query; pub use snarkvm_ledger_store::helpers::memory::BlockMemory; pub use snarkvm_synthesizer::{ - process::{cost_in_microcredits, deployment_cost}, + process::{cost_in_microcredits_v2, deployment_cost}, snark::{ProvingKey, VerifyingKey}, Process, Program, diff --git a/wasm/src/types/scalar.rs b/wasm/src/types/scalar.rs index 0d6933b98..65b5389df 100644 --- a/wasm/src/types/scalar.rs +++ b/wasm/src/types/scalar.rs @@ -15,7 +15,7 @@ // along with the Aleo SDK library. If not, see <https://www.gnu.org/licenses/>. use crate::types::native::{PlaintextNative, ScalarNative, Uniform}; -use snarkvm_console::prelude::{Double, One, Pow}; +use snarkvm_console::prelude::{Double, One, Pow, Zero}; use std::ops::Deref; use crate::{types::native::LiteralNative, Plaintext}; @@ -23,6 +23,7 @@ use once_cell::sync::OnceCell; use std::str::FromStr; use wasm_bindgen::prelude::wasm_bindgen; +/// Scalar field element. #[wasm_bindgen] #[derive(Clone, Debug, Eq, PartialEq)] pub struct Scalar(ScalarNative); @@ -54,22 +55,22 @@ impl Scalar { Scalar(ScalarNative::rand(rng)) } - /// Add two field elements. + /// Add two scalar elements. pub fn add(&self, other: &Scalar) -> Scalar { Scalar(self.0 + other.0) } - /// Subtract two field elements. + /// Subtract two scalar elements. pub fn subtract(&self, other: &Scalar) -> Scalar { Scalar(self.0 - other.0) } - /// Multiply two field elements. + /// Multiply two scalar elements. pub fn multiply(&self, other: &Scalar) -> Scalar { Scalar(self.0 * other.0) } - /// Divide two field elements. + /// Divide two scalar elements. pub fn divide(&self, other: &Scalar) -> Scalar { Scalar(self.0 / other.0) } @@ -79,12 +80,12 @@ impl Scalar { Scalar(self.0.double()) } - /// Power of a field element. + /// Power of a scalar element. pub fn pow(&self, other: &Scalar) -> Scalar { Scalar(self.0.pow(other.0)) } - /// Invert the field element. + /// Invert the scalar element. pub fn inverse(&self) -> Scalar { Scalar(-self.0) } @@ -93,6 +94,16 @@ impl Scalar { pub fn one() -> Scalar { Scalar(ScalarNative::one()) } + + /// Creates a zero valued element of the scalar field + pub fn zero() -> Scalar { + Scalar(ScalarNative::zero()) + } + + /// Check if one scalar element equals another. + pub fn equals(&self, other: &Scalar) -> bool { + self.0 == ScalarNative::from(other) + } } impl Deref for Scalar { diff --git a/yarn.lock b/yarn.lock index d91e0c7a5..a5503cb42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -105,7 +105,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz" integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.17.2", "@babel/core@^7.23.7", "@babel/core@^7.24.5", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.7.5": +"@babel/core@^7.17.2", "@babel/core@^7.23.7", "@babel/core@^7.24.5", "@babel/core@^7.7.5": version "7.25.2" resolved "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz" integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== @@ -1263,7 +1263,7 @@ style-mod "^4.0.0" w3c-keyname "^2.2.4" -"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0", "@codemirror/view@>=6.0.0": +"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0": version "6.33.0" resolved "https://registry.npmjs.org/@codemirror/view/-/view-6.33.0.tgz" integrity sha512-AroaR3BvnjRW8fiZBalAaK+ZzB5usGgI014YKElYZvQdNH5ZIidHlO+cyf/2rWzyBFRkvG6VhiXeAEbC53P2YQ== @@ -1299,6 +1299,56 @@ resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + +"@esbuild/android-arm64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz#bafb75234a5d3d1b690e7c2956a599345e84a2fd" + integrity sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA== + +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + +"@esbuild/android-arm@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.19.tgz#5898f7832c2298bc7d0ab53701c57beb74d78b4d" + integrity sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + +"@esbuild/android-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.19.tgz#658368ef92067866d95fb268719f98f363d13ae1" + integrity sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + "@esbuild/darwin-arm64@0.17.19": version "0.17.19" resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz" @@ -1314,6 +1364,281 @@ resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz" integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== +"@esbuild/darwin-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz#7751d236dfe6ce136cce343dce69f52d76b7f6cb" + integrity sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + +"@esbuild/freebsd-arm64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz#cacd171665dd1d500f45c167d50c6b7e539d5fd2" + integrity sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + +"@esbuild/freebsd-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz#0769456eee2a08b8d925d7c00b79e861cb3162e4" + integrity sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + +"@esbuild/linux-arm64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz#38e162ecb723862c6be1c27d6389f48960b68edb" + integrity sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + +"@esbuild/linux-arm@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz#1a2cd399c50040184a805174a6d89097d9d1559a" + integrity sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + +"@esbuild/linux-ia32@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz#e28c25266b036ce1cabca3c30155222841dc035a" + integrity sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + +"@esbuild/linux-loong64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz#0f887b8bb3f90658d1a0117283e55dbd4c9dcf72" + integrity sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + +"@esbuild/linux-mips64el@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz#f5d2a0b8047ea9a5d9f592a178ea054053a70289" + integrity sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + +"@esbuild/linux-ppc64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz#876590e3acbd9fa7f57a2c7d86f83717dbbac8c7" + integrity sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + +"@esbuild/linux-riscv64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz#7f49373df463cd9f41dc34f9b2262d771688bf09" + integrity sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + +"@esbuild/linux-s390x@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz#e2afd1afcaf63afe2c7d9ceacd28ec57c77f8829" + integrity sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + +"@esbuild/linux-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz#8a0e9738b1635f0c53389e515ae83826dec22aa4" + integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + +"@esbuild/netbsd-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz#c29fb2453c6b7ddef9a35e2c18b37bda1ae5c462" + integrity sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + +"@esbuild/openbsd-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz#95e75a391403cb10297280d524d66ce04c920691" + integrity sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + +"@esbuild/sunos-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz#722eaf057b83c2575937d3ffe5aeb16540da7273" + integrity sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + +"@esbuild/win32-arm64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz#9aa9dc074399288bdcdd283443e9aeb6b9552b6f" + integrity sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + +"@esbuild/win32-ia32@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz#95ad43c62ad62485e210f6299c7b2571e48d2b03" + integrity sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + +"@esbuild/win32-x64@0.17.19": + version "0.17.19" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz#8cfaf2ff603e9aabb910e9c0558c26cf32744061" + integrity sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== + +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" @@ -1419,14 +1744,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" @@ -1435,6 +1752,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@jsdoc/salty@^0.2.4": version "0.2.8" resolved "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.8.tgz" @@ -1488,6 +1813,46 @@ resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.4.tgz" integrity sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w== +"@next/swc-darwin-x64@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.4.tgz#fa11bb97bf06cd45cbd554354b46bf93e22c025b" + integrity sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw== + +"@next/swc-linux-arm64-gnu@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.4.tgz#dd3a482cd6871ed23b049066a0f3c4c2f955dc88" + integrity sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w== + +"@next/swc-linux-arm64-musl@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.4.tgz#ed6d7abaf5712cff2752ce5300d6bacc6aff1b18" + integrity sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg== + +"@next/swc-linux-x64-gnu@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.4.tgz#977a040388e8a685a3a85e0dbdff90a4ee2a7189" + integrity sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg== + +"@next/swc-linux-x64-musl@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.4.tgz#3e29a0ad8efc016196c3a120da04397eea328b2a" + integrity sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg== + +"@next/swc-win32-arm64-msvc@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.4.tgz#18a236c3fe5a48d24b56d939e6a05488bb682b7e" + integrity sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w== + +"@next/swc-win32-ia32-msvc@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.4.tgz#255132243ab6fb20d3c7c92a585e2c4fa50368fe" + integrity sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw== + +"@next/swc-win32-x64-msvc@13.5.4": + version "13.5.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.4.tgz#cc542907b55247c5634d9a8298e1c143a1847e25" + integrity sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -1496,7 +1861,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== @@ -1514,20 +1879,10 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@provablehq/sdk@^0.7.0", "@provablehq/sdk@file:/Users/privacydaddy/dev/sdk/sdk": - version "0.7.0" - resolved "file:sdk" - dependencies: - "@provablehq/wasm" "^0.7.0" - comlink "^4.4.1" - mime "^3.0.0" - sync-request "^6.1.0" - -"@provablehq/wasm@^0.7.0", "@provablehq/wasm@file:/Users/privacydaddy/dev/sdk/wasm": - version "0.7.0" - resolved "file:wasm" - dependencies: - yarn "^1.22.22" +"@provablehq/wasm@^0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@provablehq/wasm/-/wasm-0.7.2.tgz#3beb59583078ec40175ee76454760e8468912e2b" + integrity sha512-RARdSoyml70goROIJx7wI/1+TEiHz9q44aeUO5WxVeCBwjkkGDgFJWVSWFzlnehvKTB5yFa/vo7pgXvU45zzqA== "@rc-component/async-validator@^5.0.3": version "5.0.4" @@ -1692,11 +2047,86 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@rollup/rollup-android-arm-eabi@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5" + integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w== + +"@rollup/rollup-android-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb" + integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA== + "@rollup/rollup-darwin-arm64@4.22.4": version "4.22.4" resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz" integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q== +"@rollup/rollup-darwin-x64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791" + integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232" + integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ== + +"@rollup/rollup-linux-arm-musleabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa" + integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg== + +"@rollup/rollup-linux-arm64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15" + integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw== + +"@rollup/rollup-linux-arm64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820" + integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e" + integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128" + integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA== + +"@rollup/rollup-linux-s390x-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc" + integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q== + +"@rollup/rollup-linux-x64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0" + integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg== + +"@rollup/rollup-linux-x64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f" + integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g== + +"@rollup/rollup-win32-arm64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0" + integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw== + +"@rollup/rollup-win32-ia32-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422" + integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g== + +"@rollup/rollup-win32-x64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" + integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz" @@ -1709,13 +2139,6 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^13.0.1": - version "13.0.2" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.2.tgz" - integrity sha512-4Bb+oqXZTSTZ1q27Izly9lv8B9dlV61CROxPiVtywwzv5SnytJqhvYe6FclHYuXml4cd1VHPo1zd5PmTeJozvA== - dependencies: - "@sinonjs/commons" "^3.0.1" - "@sinonjs/fake-timers@11.2.2": version "11.2.2" resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz" @@ -1723,6 +2146,13 @@ dependencies: "@sinonjs/commons" "^3.0.0" +"@sinonjs/fake-timers@^13.0.1": + version "13.0.2" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.2.tgz" + integrity sha512-4Bb+oqXZTSTZ1q27Izly9lv8B9dlV61CROxPiVtywwzv5SnytJqhvYe6FclHYuXml4cd1VHPo1zd5PmTeJozvA== + dependencies: + "@sinonjs/commons" "^3.0.1" + "@sinonjs/samsam@^8.0.0": version "8.0.2" resolved "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz" @@ -1742,7 +2172,52 @@ resolved "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz" integrity sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw== -"@swc/core@^1.5.7", "@swc/core@>=1.2.50": +"@swc/core-darwin-x64@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz#867b7a4f094e6b64201090ca5fcbf3da7d0f3e22" + integrity sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ== + +"@swc/core-linux-arm-gnueabihf@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz#35bb43894def296d92aaa2cc9372d48042f37777" + integrity sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q== + +"@swc/core-linux-arm64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz#8e2321cc4ec84cbfed8f8e16ff1ed7b854450443" + integrity sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q== + +"@swc/core-linux-arm64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz#b1c16e4b23ffa9ff19973eda6ffee35d2a7de7b0" + integrity sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg== + +"@swc/core-linux-x64-gnu@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz#388e2cc13a010cd28787aead2cecf31eb491836d" + integrity sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w== + +"@swc/core-linux-x64-musl@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz#51e0ff30981f26d7a5b97a7a7b5b291bad050d1a" + integrity sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ== + +"@swc/core-win32-arm64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz#a7fdcc4074c34ee6a026506b594d00323383c11f" + integrity sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA== + +"@swc/core-win32-ia32-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz#ae7be6dde798eebee2000b8fd84e01a439b5bd6a" + integrity sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ== + +"@swc/core-win32-x64-msvc@1.7.26": + version "1.7.26" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz#310d607004d7319085a4dec20c0c38c3405cc05b" + integrity sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w== + +"@swc/core@^1.5.7": version "1.7.26" resolved "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz" integrity sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw== @@ -1766,7 +2241,7 @@ resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz" integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== -"@swc/helpers@*", "@swc/helpers@0.5.2": +"@swc/helpers@0.5.2": version "0.5.2" resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz" integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== @@ -1805,6 +2280,11 @@ resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/babel-types@*", "@types/babel-types@^7.0.0": + version "7.0.15" + resolved "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.15.tgz" + integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g== + "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz" @@ -1838,11 +2318,6 @@ dependencies: "@babel/types" "^7.20.7" -"@types/babel-types@*", "@types/babel-types@^7.0.0": - version "7.0.15" - resolved "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.15.tgz" - integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g== - "@types/babylon@^6.16.2": version "6.16.9" resolved "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.9.tgz" @@ -1966,7 +2441,7 @@ resolved "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz" integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== -"@types/markdown-it@*", "@types/markdown-it@^12.2.3": +"@types/markdown-it@^12.2.3": version "12.2.3" resolved "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz" integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== @@ -2006,7 +2481,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@>= 14": +"@types/node@*": version "22.5.5" resolved "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz" integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== @@ -2018,14 +2493,7 @@ resolved "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^20": - version "20.16.5" - resolved "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz" - integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA== - dependencies: - undici-types "~6.19.2" - -"@types/node@^20.8.7": +"@types/node@^20", "@types/node@^20.8.7": version "20.16.5" resolved "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz" integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA== @@ -2156,7 +2624,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.41.0": +"@typescript-eslint/parser@^5.41.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz" integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== @@ -2320,7 +2788,7 @@ globby "^13.2.2" magic-string "^0.30.0" -"@webassemblyjs/ast@^1.12.1", "@webassemblyjs/ast@1.12.1": +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": version "1.12.1" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz" integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== @@ -2421,7 +2889,7 @@ "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@^1.12.1", "@webassemblyjs/wasm-parser@1.12.1": +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": version "1.12.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz" integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== @@ -2508,21 +2976,16 @@ acorn@^3.1.0: resolved "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" integrity sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw== -acorn@^4.0.4: +acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8, acorn@^8.11.0, acorn@^8.11.3, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.11.0, acorn@^8.11.3, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.12.1" resolved "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -acorn@~4.0.2: - version "4.0.13" - resolved "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz" - integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug== - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" @@ -2542,7 +3005,7 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: +ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2552,7 +3015,7 @@ ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.8.2, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.9.0: version "8.17.1" resolved "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -2562,58 +3025,6 @@ ajv@^8.0.0, ajv@^8.8.2, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -"aleo-react-leo-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-react-leo": - version "0.0.0" - resolved "file:create-leo-app/template-react-leo" - dependencies: - "@provablehq/sdk" "^0.7.0" - comlink "^4.4.1" - react "^18.2.0" - react-dom "^18.2.0" - -"aleo-react-managed-worker-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-react-managed-worker": - version "0.0.0" - resolved "file:create-leo-app/template-react-managed-worker" - dependencies: - "@provablehq/sdk" "^0.7.0" - react "^18.2.0" - react-dom "^18.2.0" - -"aleo-react-typescript-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-react-ts": - version "0.0.0" - resolved "file:create-leo-app/template-react-ts" - dependencies: - "@provablehq/sdk" "^0.7.0" - comlink "^4.4.1" - react "^18.2.0" - react-dom "^18.2.0" - -"aleo-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-vanilla": - version "0.0.0" - resolved "file:create-leo-app/template-vanilla" - -"aleo-website@file:/Users/privacydaddy/dev/sdk/website": - version "0.1.0" - resolved "file:website" - dependencies: - "@ant-design/icons" "^4.4.0" - "@codemirror/language" "^6.8.0" - "@codemirror/legacy-modes" "^6.3.3" - "@codemirror/stream-parser" "^0.19.9" - "@provablehq/sdk" "^0.7.0" - "@uiw/codemirror-theme-noctis-lilac" "^4.21.8" - "@uiw/codemirror-theme-okaidia" "^4.21.7" - "@uiw/react-codemirror" "^4.21.7" - antd "^5.6.4" - axios "^1.6.0" - babel-loader "^8.2.3" - copy-to-clipboard "^3.3.1" - gh-pages "^3.1.0" - react "^18.2.0" - react-dom "^18.2.0" - react-router-dom "^6.14.1" - web-vitals "^0.2.4" - align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz" @@ -2861,7 +3272,7 @@ assertion-error@^2.0.1: resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz" integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== -ast-types@^0.12.2, ast-types@0.12.4: +ast-types@0.12.4, ast-types@^0.12.2: version "0.12.4" resolved "https://registry.npmjs.org/ast-types/-/ast-types-0.12.4.tgz" integrity sha512-ky/YVYCbtVAS8TdMIaTiPFHwEpRB5z1hctepJplTr3UW5q8TDrpIMCILyk8pmLxGtn2KCtC/lSn7zOsaI7nzDw== @@ -2992,28 +3403,6 @@ batch@0.6.1: resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== -"battleship@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-battleship": - version "0.1.0" - resolved "file:create-leo-app/template-battleship" - dependencies: - "@ant-design/icons" "^4.4.0" - "@codemirror/language" "^6.8.0" - "@codemirror/legacy-modes" "^6.3.3" - "@codemirror/stream-parser" "^0.19.9" - "@provablehq/sdk" "^0.7.0" - "@uiw/codemirror-theme-noctis-lilac" "^4.21.8" - "@uiw/codemirror-theme-okaidia" "^4.21.7" - "@uiw/react-codemirror" "^4.21.7" - antd "^5.6.4" - axios "^1.6.0" - babel-loader "^8.2.3" - copy-to-clipboard "^3.3.1" - gh-pages "^3.1.0" - react "^18.2.0" - react-dom "^18.2.0" - react-router-dom "^6.14.1" - web-vitals "^0.2.4" - better-docs@^2.7.2: version "2.7.3" resolved "https://registry.npmjs.org/better-docs/-/better-docs-2.7.3.tgz" @@ -3120,7 +3509,7 @@ 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== -browserslist@^4.0.0, browserslist@^4.21.10, browserslist@^4.23.1, browserslist@^4.23.3, "browserslist@>= 4.21.0": +browserslist@^4.0.0, browserslist@^4.21.10, browserslist@^4.23.1, browserslist@^4.23.3: version "4.23.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz" integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== @@ -3316,7 +3705,7 @@ citty@^0.1.6: dependencies: consola "^3.2.3" -classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1, classnames@^2.3.2, classnames@^2.5.1, classnames@2.x: +classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1, classnames@^2.3.2, classnames@^2.5.1: version "2.5.1" resolved "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz" integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== @@ -3406,16 +3795,16 @@ color-convert@^2.0.1: 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== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +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== + colord@^2.9.3: version "2.9.3" resolved "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz" @@ -3438,12 +3827,7 @@ comlink@^4.4.1: resolved "https://registry.npmjs.org/comlink/-/comlink-4.4.1.tgz" integrity sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q== -commander@^10.0.0: - version "10.0.1" - resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" - integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== - -commander@^10.0.1: +commander@^10.0.0, commander@^10.0.1: version "10.0.1" resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== @@ -3616,10 +4000,6 @@ cpr@^3.0.1: mkdirp "~0.5.1" rimraf "^2.5.4" -"create-leo-app@file:/Users/privacydaddy/dev/sdk/create-leo-app": - version "0.7.3" - resolved "file:create-leo-app" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" @@ -3794,7 +4174,7 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -dayjs@^1.11.11, "dayjs@>= 1.x": +dayjs@^1.11.11: version "1.11.13" resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== @@ -3804,6 +4184,13 @@ de-indent@^1.0.2: resolved "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz" integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== +debug@2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -3818,13 +4205,6 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3 dependencies: ms "^2.1.3" -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - decamelize@^1.0.0: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" @@ -3890,16 +4270,16 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + destroy@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" @@ -4086,12 +4466,7 @@ entities@^2.0.0: resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== -entities@^4.2.0: - version "4.5.0" - resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -entities@^4.4.0: +entities@^4.2.0, entities@^4.4.0: version "4.5.0" resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== @@ -4422,7 +4797,7 @@ eslint-plugin-react@^7.32.2: string.prototype.matchall "^4.0.11" string.prototype.repeat "^1.0.0" -eslint-scope@^5.1.1, eslint-scope@5.1.1: +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -4443,7 +4818,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 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@*, "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.26.0, eslint@^8.38.0, eslint@^8.45.0, eslint@>=7, eslint@>=7.0.0: +eslint@^8.26.0, eslint@^8.38.0, eslint@^8.45.0: version "8.57.1" resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz" integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== @@ -4611,10 +4986,6 @@ express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" -"extension-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-extension": - version "0.0.0" - resolved "file:create-leo-app/template-extension" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -4944,50 +5315,19 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1: +glob-parent@^6.0.1, glob-parent@^6.0.2: version "6.0.2" 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" - -glob-parent@^6.0.2: - version "6.0.2" - 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" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@^10.2.2: - version "10.4.5" - resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== - dependencies: - foreground-child "^3.1.0" - jackspeak "^3.1.2" - minimatch "^9.0.4" - minipass "^7.1.2" - package-json-from-dist "^1.0.0" - path-scurry "^1.11.1" - -glob@^10.3.7: - version "10.4.5" - resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== - dependencies: - foreground-child "^3.1.0" - jackspeak "^3.1.2" - minimatch "^9.0.4" - minipass "^7.1.2" - package-json-from-dist "^1.0.0" - path-scurry "^1.11.1" + is-glob "^4.0.3" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^10.4.5: +glob@^10.2.2, glob@^10.3.7, glob@^10.4.5: version "10.4.5" resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -5011,31 +5351,7 @@ glob@^11.0.0: package-json-from-dist "^1.0.0" path-scurry "^2.0.0" -glob@^7.0.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.4: +glob@^7.0.3, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5047,18 +5363,7 @@ glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@^8.1.0: +glob@^8.0.3, glob@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -5288,16 +5593,6 @@ http-deceiver@^1.2.7: resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" @@ -5309,6 +5604,16 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + http-parser-js@>=0.5.1: version "0.5.8" resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz" @@ -5392,7 +5697,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5416,16 +5721,16 @@ interpret@^3.1.1: resolved "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== -ipaddr.js@^2.0.1: - version "2.2.0" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz" - integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +ipaddr.js@^2.0.1: + version "2.2.0" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== + is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz" @@ -5784,7 +6089,7 @@ js2xmlparser@^4.0.2: dependencies: xmlcreate "^2.0.4" -jsdoc@^3.6.11, "jsdoc@>=3.x <=4.x": +jsdoc@^3.6.11: version "3.6.11" resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.11.tgz" integrity sha512-8UCU0TYeIYD9KeLzEcAu2q8N/mx9O3phAGl32nmHlE0LpaJL71mMkP4d+QE5zWfNt50qheHtOZ0qoxVrsX5TUg== @@ -6134,7 +6439,7 @@ markdown-it-anchor@^8.4.1: resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz" integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== -markdown-it@*, markdown-it@^12.3.2: +markdown-it@^12.3.2: version "12.3.2" resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz" integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== @@ -6205,16 +6510,16 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" -"mime-db@>= 1.43.0 < 2": - version "1.53.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz" - integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== +"mime-db@>= 1.43.0 < 2": + version "1.53.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.53.0.tgz" + integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== + mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" @@ -6222,16 +6527,16 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, dependencies: mime-db "1.52.0" -mime@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz" - integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== - mime@1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" @@ -6295,16 +6600,16 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: - version "7.1.2" - resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" - integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== - minipass@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^2.1.1: version "2.1.2" resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" @@ -6385,16 +6690,16 @@ mri@^1.2.0: resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== -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.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +ms@2.1.3, 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== + multicast-dns@^7.2.5: version "7.2.5" resolved "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz" @@ -6489,29 +6794,11 @@ node-forge@^1: resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -"node-offline-transaction-example@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-offline-public-transaction-ts": - version "0.0.0" - resolved "file:create-leo-app/template-offline-public-transaction-ts" - dependencies: - "@provablehq/sdk" "^0.7.0" - node-releases@^2.0.18: version "2.0.18" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== -"node-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-node": - version "0.0.0" - resolved "file:create-leo-app/template-node" - dependencies: - "@provablehq/sdk" "^0.7.0" - -"node-ts-starter@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-node-ts": - version "0.0.0" - resolved "file:create-leo-app/template-node-ts" - dependencies: - "@provablehq/sdk" "^0.7.0" - 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" @@ -6765,16 +7052,16 @@ path-scurry@^2.0.0: lru-cache "^11.0.0" minipass "^7.1.2" -path-to-regexp@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.1.0.tgz" - integrity sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ== - path-to-regexp@0.1.10: version "0.1.10" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz" integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== +path-to-regexp@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.1.0.tgz" + integrity sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ== + path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -7085,15 +7372,6 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.0.9, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.27, postcss@^8.4.31, postcss@^8.4.33, postcss@^8.4.38, postcss@^8.4.45: - version "8.4.47" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz" - integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== - dependencies: - nanoid "^3.3.7" - picocolors "^1.1.0" - source-map-js "^1.2.1" - postcss@8.4.31: version "8.4.31" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz" @@ -7103,16 +7381,20 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.27, postcss@^8.4.33, postcss@^8.4.45: + version "8.4.47" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.1.0" + source-map-js "^1.2.1" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^3.0.0: - version "3.3.3" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz" - integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== - prettier@2.7.1: version "2.7.1" resolved "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" @@ -7123,6 +7405,11 @@ prettier@3.0.3: resolved "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz" integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== +prettier@^3.0.0: + version "3.3.3" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== + pretty-bytes@^6.1.0: version "6.1.1" resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz" @@ -7168,7 +7455,7 @@ prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.5.9, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -7305,7 +7592,7 @@ punycode@^2.1.0: resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -qs@^6.4.0, qs@6.13.0: +qs@6.13.0, qs@^6.4.0: version "6.13.0" resolved "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== @@ -7725,7 +8012,7 @@ react-docgen@^5.4.0: node-dir "^0.1.10" strip-indent "^3.0.0" -react-dom@*, "react-dom@^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", react-dom@^17.0.2, react-dom@^18, react-dom@^18.2.0, "react-dom@>= 16.3", react-dom@>=16.0.0, react-dom@>=16.11.0, react-dom@>=16.8, react-dom@>=16.8.0, react-dom@>=16.9.0: +react-dom@^18, react-dom@^18.2.0: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -7768,7 +8055,7 @@ react-router@6.26.2: dependencies: "@remix-run/router" "1.19.2" -react@*, "react@^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", react@^17.0.2, react@^18, react@^18.2.0, react@^18.3.1, "react@>= 16.3", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@>=16.0.0, react@>=16.11.0, react@>=16.8, react@>=16.8.0, react@>=16.9.0: +react@^18, react@^18.2.0: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== @@ -8033,7 +8320,7 @@ rollup-plugin-typescript2@^0.36.0: semver "^7.5.4" tslib "^2.6.2" -rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.68.0||^3.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.0, rollup@^3.20.2, rollup@^3.27.1, rollup@^3.27.2, rollup@>=1.26.3: +rollup@^3.20.2, rollup@^3.27.1, rollup@^3.27.2: version "3.29.5" resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz" integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w== @@ -8082,25 +8369,15 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.1.0, safe-buffer@>=5.1.0, safe-buffer@~5.2.0, safe-buffer@5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-regex-test@^1.0.3: version "1.0.3" @@ -8181,22 +8458,7 @@ semver@^6.0.0, semver@^6.3.1: resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7: - version "7.6.3" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== - -semver@^7.5.3: - version "7.6.3" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== - -semver@^7.5.4: - version "7.6.3" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== - -semver@^7.6.3: +semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: version "7.6.3" resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -8415,35 +8677,21 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - statuses@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + streamsearch@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - string-convert@^0.2.0: version "0.2.1" resolved "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz" @@ -8530,6 +8778,20 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + "strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -8624,14 +8886,7 @@ supports-color@^7, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: - 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@^8.1.1: +supports-color@^8.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== @@ -8701,16 +8956,6 @@ tar@^6.1.11: mkdirp "^1.0.3" yallist "^4.0.0" -"template-nextjs@file:/Users/privacydaddy/dev/sdk/create-leo-app/template-nextjs-ts": - version "0.1.0" - resolved "file:create-leo-app/template-nextjs-ts" - dependencies: - "@provablehq/sdk" "^0.7.0" - next "13.5.4" - react "^18" - react-dom "^18" - terser-webpack-plugin "^5.3.9" - terser-webpack-plugin@^5.3.10, terser-webpack-plugin@^5.3.9: version "5.3.10" resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz" @@ -8722,7 +8967,7 @@ terser-webpack-plugin@^5.3.10, terser-webpack-plugin@^5.3.9: serialize-javascript "^6.0.1" terser "^5.26.0" -terser@^5.10.0, terser@^5.15.1, terser@^5.26.0, terser@^5.4.0: +terser@^5.10.0, terser@^5.15.1, terser@^5.26.0: version "5.33.0" resolved "https://registry.npmjs.org/terser/-/terser-5.33.0.tgz" integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== @@ -8875,16 +9120,16 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -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== - type-detect@4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +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== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" @@ -8952,16 +9197,16 @@ typescript@^3.2.2: resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -"typescript@^4.1 || ^5.0", typescript@^5, typescript@^5.0.4, typescript@^5.2.2, typescript@>=2.4.0, typescript@>=2.7, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=5.5.4: - version "5.6.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz" - integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== - typescript@^4.5.4: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5, typescript@^5.0.4, typescript@^5.2.2: + version "5.6.2" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz" @@ -9071,7 +9316,7 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -9143,7 +9388,7 @@ vary@~1.1.2: resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -"vite@^4 || ^5", "vite@^4.2.0 || ^5.0.0", vite@^4.4.12: +vite@^4.4.12: version "4.5.5" resolved "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz" integrity sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ== @@ -9202,14 +9447,6 @@ wasm-pack@^0.12.1: dependencies: binary-install "^1.0.1" -watchpack@^2.4.1: - version "2.4.2" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz" - integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - watchpack@2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" @@ -9218,6 +9455,14 @@ watchpack@2.4.0: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" +watchpack@^2.4.1: + version "2.4.2" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" @@ -9235,7 +9480,7 @@ webidl-conversions@^3.0.0: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webpack-cli@^5.1.4, webpack-cli@5.x.x: +webpack-cli@^5.1.4: version "5.1.4" resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz" integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== @@ -9315,7 +9560,7 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -"webpack@^4.0.0 || ^5.0.0", "webpack@^4.37.0 || ^5.0.0", webpack@^5.0.0, webpack@^5.1.0, webpack@^5.20.0, webpack@^5.76.0, webpack@>=2, webpack@5.x.x: +webpack@^5.76.0: version "5.94.0" resolved "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz" integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== @@ -9344,7 +9589,7 @@ webpack-sources@^3.2.3: watchpack "^2.4.1" webpack-sources "^3.2.3" -websocket-driver@^0.7.4, websocket-driver@>=0.5.1: +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== @@ -9556,11 +9801,6 @@ yargs@~3.10.0: decamelize "^1.0.0" window-size "0.1.0" -yarn@^1.22.22: - version "1.22.22" - resolved "https://registry.npmjs.org/yarn/-/yarn-1.22.22.tgz" - integrity sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg== - yn@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz"