create-leo-app 0.9.18 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-build-and-execute-authorization-ts/package.json +1 -1
- package/template-extension/package.json +2 -1
- package/template-nextjs-ts/node_modules/@types/node/README.md +1 -1
- package/template-nextjs-ts/node_modules/@types/node/package.json +2 -2
- package/template-nextjs-ts/node_modules/@types/node/process.d.ts +0 -19
- package/template-nextjs-ts/node_modules/@types/node/tls.d.ts +0 -4
- package/template-nextjs-ts/package.json +2 -2
- package/template-node/package.json +1 -1
- package/template-node-credits-aleo-functions-ts/package.json +1 -1
- package/template-node-ts/dist/index.js +96 -92
- package/template-node-ts/dist/index.js.map +1 -1
- package/template-node-ts/package.json +1 -1
- package/template-node-ts/src/index.ts +44 -0
- package/template-offline-public-transaction-ts/package.json +1 -1
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/LICENSE +21 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/README.md +15 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/assert.d.ts +1078 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/async_hooks.d.ts +603 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/buffer.d.ts +1934 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/child_process.d.ts +1476 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/cluster.d.ts +578 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/console.d.ts +452 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/constants.d.ts +21 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/crypto.d.ts +4545 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/dgram.d.ts +600 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/dns.d.ts +923 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/domain.d.ts +170 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/events.d.ts +976 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/fs/promises.d.ts +1295 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/fs.d.ts +4461 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/globals.d.ts +172 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/http.d.ts +2089 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/http2.d.ts +2644 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/https.d.ts +579 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/index.d.ts +97 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/inspector.d.ts +253 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/module.d.ts +891 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/net.d.ts +1057 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/os.d.ts +506 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/package.json +145 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/path.d.ts +200 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/perf_hooks.d.ts +968 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/process.d.ts +2070 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/punycode.d.ts +117 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/querystring.d.ts +152 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/readline.d.ts +594 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/repl.d.ts +428 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/sea.d.ts +153 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/sqlite.d.ts +721 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/stream/web.d.ts +622 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/stream.d.ts +1664 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/test.d.ts +2162 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/timers.d.ts +287 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/tls.d.ts +1315 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/trace_events.d.ts +197 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/ts5.6/index.d.ts +97 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/tty.d.ts +208 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/url.d.ts +984 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/util.d.ts +2606 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/v8.d.ts +920 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/vm.d.ts +1000 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/wasi.d.ts +181 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/worker_threads.d.ts +784 -0
- package/template-react-credits-aleo-functions-ts/node_modules/@types/node/zlib.d.ts +683 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/LICENSE +21 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/README.md +6 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/agent.d.ts +31 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/api.d.ts +43 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/cache.d.ts +36 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/client.d.ts +108 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/connector.d.ts +34 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/content-type.d.ts +21 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/cookies.d.ts +28 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/errors.d.ts +149 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/eventsource.d.ts +61 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/fetch.d.ts +209 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/file.d.ts +39 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/filereader.d.ts +54 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/formdata.d.ts +108 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/global-origin.d.ts +7 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/handlers.d.ts +15 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/header.d.ts +4 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/index.d.ts +71 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/interceptors.d.ts +17 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/mock-client.d.ts +25 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/package.json +55 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/patch.d.ts +33 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/pool.d.ts +39 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/readable.d.ts +65 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/util.d.ts +18 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/webidl.d.ts +228 -0
- package/template-react-credits-aleo-functions-ts/node_modules/undici-types/websocket.d.ts +150 -0
- package/template-react-credits-aleo-functions-ts/package.json +2 -2
- package/template-react-leo/package.json +2 -2
- package/template-react-managed-worker/package.json +2 -2
- package/template-react-ts/node_modules/@types/node/README.md +1 -1
- package/template-react-ts/node_modules/@types/node/package.json +2 -2
- package/template-react-ts/node_modules/@types/node/process.d.ts +0 -19
- package/template-react-ts/node_modules/@types/node/tls.d.ts +0 -4
- package/template-react-ts/package.json +2 -2
- package/template-react-ts/src/App.tsx +72 -0
- package/template-react-ts/src/workers/worker.ts +12 -1
- package/template-vanilla/package.json +1 -1
- package/template-react-ts/node_modules/.vite/deps/@scure_base.js +0 -534
- package/template-react-ts/node_modules/.vite/deps/@scure_base.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/_metadata.json +0 -67
- package/template-react-ts/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
- package/template-react-ts/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/chunk-CEAIHRR2.js +0 -280
- package/template-react-ts/node_modules/.vite/deps/chunk-CEAIHRR2.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/chunk-IWTZO5RK.js +0 -1004
- package/template-react-ts/node_modules/.vite/deps/chunk-IWTZO5RK.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/comlink.js +0 -352
- package/template-react-ts/node_modules/.vite/deps/comlink.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/core-js_proposals_json-parse-with-source__js.js +0 -1662
- package/template-react-ts/node_modules/.vite/deps/core-js_proposals_json-parse-with-source__js.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/package.json +0 -3
- package/template-react-ts/node_modules/.vite/deps/react-dom.js +0 -6
- package/template-react-ts/node_modules/.vite/deps/react-dom.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/react-dom_client.js +0 -20217
- package/template-react-ts/node_modules/.vite/deps/react-dom_client.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/react.js +0 -5
- package/template-react-ts/node_modules/.vite/deps/react.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -278
- package/template-react-ts/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
- package/template-react-ts/node_modules/.vite/deps/react_jsx-runtime.js +0 -289
- package/template-react-ts/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
package/package.json
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"build": "rimraf static/js && rollup --config"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@provablehq/sdk": "^0.
|
|
10
|
+
"@provablehq/sdk": "^0.10.0",
|
|
11
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
11
12
|
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
|
|
12
13
|
"rimraf": "^6.0.1",
|
|
13
14
|
"rollup": "^4.59.0"
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 08 Dec 2025 22:36:14 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.19.
|
|
3
|
+
"version": "22.19.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -140,6 +140,6 @@
|
|
|
140
140
|
"undici-types": "~6.21.0"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {},
|
|
143
|
-
"typesPublisherContentHash": "
|
|
143
|
+
"typesPublisherContentHash": "cb67dd83f6f69ba1e456c156512686df21fb7978863408330225329e663f5c7e",
|
|
144
144
|
"typeScriptVersion": "5.2"
|
|
145
145
|
}
|
|
@@ -474,11 +474,6 @@ declare module "process" {
|
|
|
474
474
|
* @default false
|
|
475
475
|
*/
|
|
476
476
|
reportOnUncaughtException: boolean;
|
|
477
|
-
/**
|
|
478
|
-
* If true, a diagnostic report is generated without the environment variables.
|
|
479
|
-
* @default false
|
|
480
|
-
*/
|
|
481
|
-
excludeEnv: boolean;
|
|
482
477
|
/**
|
|
483
478
|
* The signal used to trigger the creation of a diagnostic report.
|
|
484
479
|
* @default 'SIGUSR2'
|
|
@@ -1710,11 +1705,6 @@ declare module "process" {
|
|
|
1710
1705
|
* @param args Additional arguments to pass when invoking the `callback`
|
|
1711
1706
|
*/
|
|
1712
1707
|
nextTick(callback: Function, ...args: any[]): void;
|
|
1713
|
-
/**
|
|
1714
|
-
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
|
|
1715
|
-
* See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
|
|
1716
|
-
*/
|
|
1717
|
-
noDeprecation?: boolean;
|
|
1718
1708
|
/**
|
|
1719
1709
|
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
|
|
1720
1710
|
*
|
|
@@ -1791,15 +1781,6 @@ declare module "process" {
|
|
|
1791
1781
|
options?: MessageOptions,
|
|
1792
1782
|
callback?: (error: Error | null) => void,
|
|
1793
1783
|
): boolean;
|
|
1794
|
-
send?(
|
|
1795
|
-
message: any,
|
|
1796
|
-
sendHandle: SendHandle,
|
|
1797
|
-
callback?: (error: Error | null) => void,
|
|
1798
|
-
): boolean;
|
|
1799
|
-
send?(
|
|
1800
|
-
message: any,
|
|
1801
|
-
callback: (error: Error | null) => void,
|
|
1802
|
-
): boolean;
|
|
1803
1784
|
/**
|
|
1804
1785
|
* If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
|
|
1805
1786
|
* IPC channel to the parent process, allowing the child process to exit gracefully
|
|
@@ -245,10 +245,6 @@ declare module "tls" {
|
|
|
245
245
|
* When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
|
|
246
246
|
*/
|
|
247
247
|
alpnProtocol: string | false | null;
|
|
248
|
-
/**
|
|
249
|
-
* String containing the server name requested via SNI (Server Name Indication) TLS extension.
|
|
250
|
-
*/
|
|
251
|
-
servername: string | false | null;
|
|
252
248
|
/**
|
|
253
249
|
* Returns an object representing the local certificate. The returned object has
|
|
254
250
|
* some properties corresponding to the fields of the certificate.
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import { initThreadPool, ProgramManager, Account, AleoKeyProvider,
|
|
1
|
+
import { initThreadPool, ProgramManager, Account, AleoKeyProvider, VerifyingKey, Proof } from '@provablehq/sdk/testnet.js';
|
|
2
2
|
|
|
3
3
|
// Initialize the thread pool in order to prove faster.
|
|
4
4
|
await initThreadPool();
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
input r0 as u32.public;
|
|
11
|
-
input r1 as u32.private;
|
|
12
|
-
add r0 r1 into r2;
|
|
13
|
-
output r2 as u32.private;
|
|
14
|
-
|
|
15
|
-
constructor:
|
|
16
|
-
assert.eq edition 0u16;
|
|
17
|
-
`;
|
|
18
|
-
return hello_hello_program;
|
|
19
|
-
}
|
|
5
|
+
// Sample SNARK proof fixtures from a simple test circuit with 2 public inputs, both equal to 1field.
|
|
6
|
+
// These are used to demonstrate standalone proof verification with snarkVerify/snarkVerifyBatch.
|
|
7
|
+
const SAMPLE_VERIFYING_KEY = "verifier1qypqqqqqqqqqqqyxqqqqqqqqqqqyzqqqqqqqqqqqgyqqqqqqqqqqqsgqqqqqqqqqqpqsqqqqqqqqqqqvqqqqqqqqqqqgh4c0dzjasutflzxx36ckaea0zr5xqu0ydpaascrhacjlftlvnt99yg003w45g0mj4qepazsl5w5qfl5dm9y3sfq87376ynfyync09xyaz05ggfh79lkpx6yzunrz06zdwsu4klsj9z3933wpeggqj2msqs5xeul99lvzyd98mfmqm34nud4z7qjkxk708d9mvgqqw9hwkes726yl5nla6mr7s56p2a2c36csqpl0qe39wd8rswunurla70pqes7fay5kzh7jv5l5plpc82yu5p8thnxavejw3kwxz038sdmf34n9uqt77pnz2u6w8qae8c8lmu7zpnpun6ffv90ayeflgr7rsw5fegzwh0xd6enyarvuvylz0qmknrtxtcqhaurxy4e5uwpmj0s0lheuyrxre85jjc2l6fjn7s8u8qagnjsyaw7vm4nxf6xeccf7y7phdxxkvhspj4chhza3rsj4v66lfc00u27y9g2mlg7ttgdx8m9d09lns7lcjqmcs9lraqk9wac52hwc0th9g3qsrrsk2xszjn0qyuwcas5g76c4l8u8zycc5n4uslf6kajp0c4aq6ea7d8u3rvxkql5l8njthv82ygpsqmd034693yathl585th5rh29c0yf29l7yk4nry7daf3ndm7lhv8nvy546sa0uysqcvdy5tlxzqq3q8swlatmy33h6zn7ychqcnjjvfc8a4q0szr70k9l2qa8my76c0ud5e5t5yksd78ytlhey426p2xdxq2vfrtuhduyjjh5wgwn35fxz2rvhgaysyhgph4at920ykfrjqph8gjp47vl77zlzqhnwljkxnz6guqmh8xy62966f0sw505l07m64r2qvxd9ggzng7naawtsran2yj77fts7e7mccf25svwdhzt998ee7cruwc6gx9krqpj4ll7x5jw0l3sw8kwjfgck0an2dwcp4dz9yfq272svqqqqqqqqqqqhzxq3v";
|
|
8
|
+
const SAMPLE_PROOF = "proof1qyqsqqqqqqqqqqqpqqqqqqqqqqqg4v4ffaewfrdfyl442hd2jryku27u9cajphqaqa5keztfzy75mxctwth0w9599r2ra0awu9jfmj5qq9n6ufwrq0r68g2wcse7avhuy2t37mp35s39wtl0z9f53qhatkl4gqpyzheggtkj2gxzl45jwjtx8qtsx5wh09f286p866gzc6x292u773zhtgzvxucw5jv397ngkh5wcwtjzwy8qsxhtywz5egx5hzg6wqyayt8ernlmgdy7d6ytmxyx3azdvy6qsjfcqjdmvr3ycaqmzaz20umm3zu4jzunjkwfsm3ry9nu7vqfypg567n33m3226l797v7pqltuw8yl8xwh5jrkgpgjvl8uqp2fttyvs7k0ye5eeeswnl0506aw0qrnxpc687002ukjxdd222ffw6lk8gleuf0tvq4lxkskmhrlqaj95zvp2w9aeza4sdt7hdecy29er3s84skdxq5uf0m767ecpa60tm0krx4vdp2umvdy6aaddy7xxpvtwmwfan8z23yud27z8pan8msgr3zq2s2qnfnqhg8cltzl7v9fewna69kavvy570l62k55x2wayjvvhha2uk6vje5zsgvqw67cskce4dxcqtrdpvkkl3n7yt2v4pwexhw8ftgnv0kkvumgha2cfyn84yp7v2ztysawmt65y2z28auutxlh05nvcqlhaj2a3wd3gqw6tc02z0s67v4x5kh3st28v30nf9cv9k6g5jnc89z4hmu32nnnm9j625q75nfcr99hjpqu50rhqpu57lqnjdwhfu2pvstze2c0qj0a2d4zkcg88ep79eyqe7e399hx86e6p4qswjk32dpg45r7jtzhse8szcaxu7md99u7luj2afl07jzp5zqut05a85qg5qkd8syclvv5sqf4xtfqca4c9r6ffptmv2l587qx8knn7qpukt4hqqpkw27z7tf0xk9z7esermt8hmr2auefw3c0drel890ep6rujt3uff504q744z5s9v2krxkvh3vqjjr48dnuzx5vzpymcz0sdvvt7v7p5pymj82a5p33fd4xup79muz3zvn8tq09mlfujr2nyv99ad80u4qvutsca8g63aw7dsq0hvql3c07l0lxl39lwr8gqwqpvfx85tjpyq3wgn3c7az3xvnj22h2c4qq356zgxjwl69wn4jx4srjsczanm9sqdqvqqqqqqqqqqq2ku9a56rnzvm4zchvwea5dt9qnwjl789zar0dvjmze3aft5d567q2ntdw85p6ep925xx3hymjgwqyqtnxjhxr50cp8tqvpwlexzyajld9z2gu3zzy6cvllnh2kmzr4ctdz78wyprdvxyf2aqs8apz866aspq9qdtd535z8uqaacz6d9v7jahs87gav0388kg0ctdup7h93pphqs27m5jud96f2pnwclyhvk3lv9pgl57l7mqzgljm9qc2kdy39j8eyhq8guca5ytphd7cnjl9u8nurcqqqqw7lyxe";
|
|
9
|
+
const SAMPLE_INPUTS = ["1field", "1field"];
|
|
20
10
|
const programManager = new ProgramManager();
|
|
21
11
|
// Create a temporary account for the execution of the program
|
|
22
12
|
const account = new Account();
|
|
@@ -25,88 +15,102 @@ programManager.setAccount(account);
|
|
|
25
15
|
const keyProvider = new AleoKeyProvider();
|
|
26
16
|
keyProvider.useCache(true);
|
|
27
17
|
programManager.setKeyProvider(keyProvider);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
console.log("hello_hello/hello execution verified!");
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
throw ("Execution failed verification!");
|
|
50
|
-
}
|
|
18
|
+
// Demonstrate standalone SNARK proof verification. This verifies a proof from a circuit that is
|
|
19
|
+
// not necessarily an Aleo program execution. Useful for verifying proofs received from external
|
|
20
|
+
// sources (e.g. another party proved a computation and you want to verify it).
|
|
21
|
+
function snarkProofVerification() {
|
|
22
|
+
// Parse the verifying key and proof from their string representations.
|
|
23
|
+
const verifyingKey = VerifyingKey.fromString(SAMPLE_VERIFYING_KEY);
|
|
24
|
+
const proof = Proof.fromString(SAMPLE_PROOF);
|
|
25
|
+
// Verify the proof with the correct public inputs.
|
|
26
|
+
const isValid = verifyingKey.verify(SAMPLE_INPUTS, proof);
|
|
27
|
+
console.log(` VerifyingKey.verify with valid inputs: ${isValid}`); // true
|
|
28
|
+
// Verify the proof with wrong inputs — this should return false.
|
|
29
|
+
const isInvalid = verifyingKey.verify(["1field", "2field"], proof);
|
|
30
|
+
console.log(` VerifyingKey.verify with wrong inputs: ${isInvalid}`); // false
|
|
31
|
+
// Batch verification: verify the same proof with its verifying key and inputs in a batch context.
|
|
32
|
+
// VerifyingKey.verifyBatch takes arrays of verifying key strings and a 3D inputs array:
|
|
33
|
+
// [circuit_index][instance_index][field_index]
|
|
34
|
+
const batchResult = VerifyingKey.verifyBatch([SAMPLE_VERIFYING_KEY], [[SAMPLE_INPUTS]], proof);
|
|
35
|
+
console.log(` VerifyingKey.verifyBatch result: ${batchResult}`); // true
|
|
51
36
|
}
|
|
52
37
|
// Run a deployment and both online and offline executions.
|
|
53
38
|
async function run(online = false) {
|
|
54
|
-
// Generate the hello_hello.aleo program source code and inputs.
|
|
55
|
-
let programName = `hello_hello.aleo`;
|
|
56
|
-
let hello_hello_program = generateHelloHelloSource(programName);
|
|
57
|
-
const functionName = "hello";
|
|
58
|
-
const inputs = ["5u32", "5u32"];
|
|
59
|
-
|
|
60
|
-
console.log("
|
|
61
|
-
// Execute the program
|
|
62
|
-
|
|
39
|
+
// // Generate the hello_hello.aleo program source code and inputs.
|
|
40
|
+
// let programName = `hello_hello.aleo`;
|
|
41
|
+
// let hello_hello_program = generateHelloHelloSource(programName);
|
|
42
|
+
// const functionName = "hello";
|
|
43
|
+
// const inputs = ["5u32", "5u32"];
|
|
44
|
+
//
|
|
45
|
+
// console.log("");
|
|
46
|
+
// console.log("// --- STEP 1: Execute the program offline to test it gives the expected results. --- //");
|
|
47
|
+
// // Execute the program locally.
|
|
48
|
+
// console.log(`Executing ${programName}/hello offline`);
|
|
49
|
+
// let start = Date.now();
|
|
50
|
+
// const result = await localProgramExecution(hello_hello_program, programName, functionName, inputs);
|
|
51
|
+
// console.log(`✅ Local execute finished in ${(Date.now() - start)/1000}s`);
|
|
52
|
+
//
|
|
53
|
+
// console.log("");
|
|
54
|
+
// console.log("// --- STEP 2: Build the deployment transaction. --- //");
|
|
63
55
|
let start = Date.now();
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// If the deployment flag is set to true, deploy the program on testnet (requires aleo credits).
|
|
74
|
-
if (online) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
// programName = `hello_hello_${Math.floor(Math.random() * 65536)}.aleo`;
|
|
57
|
+
// hello_hello_program = generateHelloHelloSource(programName);
|
|
58
|
+
// const deploymentTx: Transaction = await programManager.buildDeploymentTransaction(
|
|
59
|
+
// hello_hello_program,
|
|
60
|
+
// 0,
|
|
61
|
+
// false,
|
|
62
|
+
// )
|
|
63
|
+
// console.log(`✅ Deployment transaction built in ${(Date.now() - start)/1000}s`);
|
|
64
|
+
//
|
|
65
|
+
// // If the deployment flag is set to true, deploy the program on testnet (requires aleo credits).
|
|
66
|
+
// if (online) {
|
|
67
|
+
// const txId: string = await programManager.networkClient.submitTransaction(deploymentTx);
|
|
68
|
+
// const confirmedTx: ConfirmedTransactionJSON = await programManager.networkClient.waitForTransactionConfirmation(txId);
|
|
69
|
+
// if (txId === confirmedTx.transaction.id) {
|
|
70
|
+
// console.log(`Program ${programName} deployed to Aleo Testnet successfully!`);
|
|
71
|
+
// }
|
|
72
|
+
// } else {
|
|
73
|
+
// programName = `hello_hello.aleo`;
|
|
74
|
+
// hello_hello_program = generateHelloHelloSource(programName);
|
|
75
|
+
// }
|
|
76
|
+
//
|
|
77
|
+
// console.log("");
|
|
78
|
+
// console.log("// --- STEP 3: Execute the program ONLINE. --- //");
|
|
79
|
+
//
|
|
80
|
+
// // If the program was actually deployed, execute it online. Otherwise, execute an equivalent
|
|
81
|
+
// // program with the same logic.
|
|
82
|
+
// console.log(`Executing ${programName}/hello online on the aleo network`);
|
|
83
|
+
// start = Date.now();
|
|
84
|
+
// const keySearchParams = new AleoKeyProviderParams({cacheKey: `${programName}:${functionName}`});
|
|
85
|
+
// const executionTx: Transaction = await programManager.buildExecutionTransaction(
|
|
86
|
+
// {
|
|
87
|
+
// programName,
|
|
88
|
+
// functionName,
|
|
89
|
+
// priorityFee: 0,
|
|
90
|
+
// privateFee: false,
|
|
91
|
+
// inputs: inputs,
|
|
92
|
+
// keySearchParams,
|
|
93
|
+
// program: hello_hello_program
|
|
94
|
+
// }
|
|
95
|
+
// )
|
|
96
|
+
// console.log(`✅ Online execution of ${programName} built in ${(Date.now() - start)/1000}s`);
|
|
97
|
+
//
|
|
98
|
+
// // If the online option is specified, submit the transaction to the network.
|
|
99
|
+
// if (online) {
|
|
100
|
+
// const txId: string = await programManager.networkClient.submitTransaction(executionTx);
|
|
101
|
+
// const confirmedTx: ConfirmedTransactionJSON = await programManager.networkClient.waitForTransactionConfirmation(txId);
|
|
102
|
+
// if (txId === confirmedTx.transaction.id) {
|
|
103
|
+
// console.log(`Program ${programName}/hello executed successfully!`);
|
|
104
|
+
// }
|
|
105
|
+
// }
|
|
85
106
|
console.log("");
|
|
86
|
-
console.log("// --- STEP
|
|
87
|
-
//
|
|
88
|
-
// program
|
|
89
|
-
|
|
107
|
+
console.log("// --- STEP 4: Verify a standalone SNARK proof. --- //");
|
|
108
|
+
// snarkVerify and snarkVerifyBatch let you verify a proof from any Varuna circuit directly,
|
|
109
|
+
// without requiring an on-chain program execution. This is useful when you receive a proof
|
|
110
|
+
// from an external source and want to verify it independently.
|
|
90
111
|
start = Date.now();
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
programName,
|
|
94
|
-
functionName,
|
|
95
|
-
priorityFee: 0,
|
|
96
|
-
privateFee: false,
|
|
97
|
-
inputs: inputs,
|
|
98
|
-
keySearchParams,
|
|
99
|
-
program: hello_hello_program
|
|
100
|
-
});
|
|
101
|
-
console.log(`✅ Online execution of ${programName} built in ${(Date.now() - start) / 1000}s`);
|
|
102
|
-
// If the online option is specified, submit the transaction to the network.
|
|
103
|
-
if (online) {
|
|
104
|
-
const txId = await programManager.networkClient.submitTransaction(executionTx);
|
|
105
|
-
const confirmedTx = await programManager.networkClient.waitForTransactionConfirmation(txId);
|
|
106
|
-
if (txId === confirmedTx.transaction.id) {
|
|
107
|
-
console.log(`Program ${programName}/hello executed successfully!`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
112
|
+
snarkProofVerification();
|
|
113
|
+
console.log(`✅ SNARK proof verification finished in ${(Date.now() - start) / 1000}s`);
|
|
110
114
|
}
|
|
111
115
|
// Run the offline execution, deployment, and online execution of hello_hello.aleo.
|
|
112
116
|
await run(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,8 +4,10 @@ import {
|
|
|
4
4
|
AleoKeyProviderParams,
|
|
5
5
|
ConfirmedTransactionJSON,
|
|
6
6
|
initThreadPool,
|
|
7
|
+
Proof,
|
|
7
8
|
ProgramManager,
|
|
8
9
|
Transaction,
|
|
10
|
+
VerifyingKey,
|
|
9
11
|
} from "@provablehq/sdk/testnet.js";
|
|
10
12
|
|
|
11
13
|
// Initialize the thread pool in order to prove faster.
|
|
@@ -27,6 +29,12 @@ constructor:
|
|
|
27
29
|
return hello_hello_program;
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
// Sample SNARK proof fixtures from a simple test circuit with 2 public inputs, both equal to 1field.
|
|
33
|
+
// These are used to demonstrate standalone proof verification with snarkVerify/snarkVerifyBatch.
|
|
34
|
+
const SAMPLE_VERIFYING_KEY = "verifier1qypqqqqqqqqqqqyxqqqqqqqqqqqyzqqqqqqqqqqqgyqqqqqqqqqqqsgqqqqqqqqqqpqsqqqqqqqqqqqvqqqqqqqqqqqgh4c0dzjasutflzxx36ckaea0zr5xqu0ydpaascrhacjlftlvnt99yg003w45g0mj4qepazsl5w5qfl5dm9y3sfq87376ynfyync09xyaz05ggfh79lkpx6yzunrz06zdwsu4klsj9z3933wpeggqj2msqs5xeul99lvzyd98mfmqm34nud4z7qjkxk708d9mvgqqw9hwkes726yl5nla6mr7s56p2a2c36csqpl0qe39wd8rswunurla70pqes7fay5kzh7jv5l5plpc82yu5p8thnxavejw3kwxz038sdmf34n9uqt77pnz2u6w8qae8c8lmu7zpnpun6ffv90ayeflgr7rsw5fegzwh0xd6enyarvuvylz0qmknrtxtcqhaurxy4e5uwpmj0s0lheuyrxre85jjc2l6fjn7s8u8qagnjsyaw7vm4nxf6xeccf7y7phdxxkvhspj4chhza3rsj4v66lfc00u27y9g2mlg7ttgdx8m9d09lns7lcjqmcs9lraqk9wac52hwc0th9g3qsrrsk2xszjn0qyuwcas5g76c4l8u8zycc5n4uslf6kajp0c4aq6ea7d8u3rvxkql5l8njthv82ygpsqmd034693yathl585th5rh29c0yf29l7yk4nry7daf3ndm7lhv8nvy546sa0uysqcvdy5tlxzqq3q8swlatmy33h6zn7ychqcnjjvfc8a4q0szr70k9l2qa8my76c0ud5e5t5yksd78ytlhey426p2xdxq2vfrtuhduyjjh5wgwn35fxz2rvhgaysyhgph4at920ykfrjqph8gjp47vl77zlzqhnwljkxnz6guqmh8xy62966f0sw505l07m64r2qvxd9ggzng7naawtsran2yj77fts7e7mccf25svwdhzt998ee7cruwc6gx9krqpj4ll7x5jw0l3sw8kwjfgck0an2dwcp4dz9yfq272svqqqqqqqqqqqhzxq3v";
|
|
35
|
+
const SAMPLE_PROOF = "proof1qyqsqqqqqqqqqqqpqqqqqqqqqqqg4v4ffaewfrdfyl442hd2jryku27u9cajphqaqa5keztfzy75mxctwth0w9599r2ra0awu9jfmj5qq9n6ufwrq0r68g2wcse7avhuy2t37mp35s39wtl0z9f53qhatkl4gqpyzheggtkj2gxzl45jwjtx8qtsx5wh09f286p866gzc6x292u773zhtgzvxucw5jv397ngkh5wcwtjzwy8qsxhtywz5egx5hzg6wqyayt8ernlmgdy7d6ytmxyx3azdvy6qsjfcqjdmvr3ycaqmzaz20umm3zu4jzunjkwfsm3ry9nu7vqfypg567n33m3226l797v7pqltuw8yl8xwh5jrkgpgjvl8uqp2fttyvs7k0ye5eeeswnl0506aw0qrnxpc687002ukjxdd222ffw6lk8gleuf0tvq4lxkskmhrlqaj95zvp2w9aeza4sdt7hdecy29er3s84skdxq5uf0m767ecpa60tm0krx4vdp2umvdy6aaddy7xxpvtwmwfan8z23yud27z8pan8msgr3zq2s2qnfnqhg8cltzl7v9fewna69kavvy570l62k55x2wayjvvhha2uk6vje5zsgvqw67cskce4dxcqtrdpvkkl3n7yt2v4pwexhw8ftgnv0kkvumgha2cfyn84yp7v2ztysawmt65y2z28auutxlh05nvcqlhaj2a3wd3gqw6tc02z0s67v4x5kh3st28v30nf9cv9k6g5jnc89z4hmu32nnnm9j625q75nfcr99hjpqu50rhqpu57lqnjdwhfu2pvstze2c0qj0a2d4zkcg88ep79eyqe7e399hx86e6p4qswjk32dpg45r7jtzhse8szcaxu7md99u7luj2afl07jzp5zqut05a85qg5qkd8syclvv5sqf4xtfqca4c9r6ffptmv2l587qx8knn7qpukt4hqqpkw27z7tf0xk9z7esermt8hmr2auefw3c0drel890ep6rujt3uff504q744z5s9v2krxkvh3vqjjr48dnuzx5vzpymcz0sdvvt7v7p5pymj82a5p33fd4xup79muz3zvn8tq09mlfujr2nyv99ad80u4qvutsca8g63aw7dsq0hvql3c07l0lxl39lwr8gqwqpvfx85tjpyq3wgn3c7az3xvnj22h2c4qq356zgxjwl69wn4jx4srjsczanm9sqdqvqqqqqqqqqqq2ku9a56rnzvm4zchvwea5dt9qnwjl789zar0dvjmze3aft5d567q2ntdw85p6ep925xx3hymjgwqyqtnxjhxr50cp8tqvpwlexzyajld9z2gu3zzy6cvllnh2kmzr4ctdz78wyprdvxyf2aqs8apz866aspq9qdtd535z8uqaacz6d9v7jahs87gav0388kg0ctdup7h93pphqs27m5jud96f2pnwclyhvk3lv9pgl57l7mqzgljm9qc2kdy39j8eyhq8guca5ytphd7cnjl9u8nurcqqqqw7lyxe";
|
|
36
|
+
const SAMPLE_INPUTS = ["1field", "1field"];
|
|
37
|
+
|
|
30
38
|
const programManager = new ProgramManager();
|
|
31
39
|
|
|
32
40
|
// Create a temporary account for the execution of the program
|
|
@@ -73,6 +81,33 @@ async function localProgramExecution(program: string, programName: string, aleoF
|
|
|
73
81
|
}
|
|
74
82
|
}
|
|
75
83
|
|
|
84
|
+
// Demonstrate standalone SNARK proof verification. This verifies a proof from a circuit that is
|
|
85
|
+
// not necessarily an Aleo program execution. Useful for verifying proofs received from external
|
|
86
|
+
// sources (e.g. another party proved a computation and you want to verify it).
|
|
87
|
+
function snarkProofVerification() {
|
|
88
|
+
// Parse the verifying key and proof from their string representations.
|
|
89
|
+
const verifyingKey = VerifyingKey.fromString(SAMPLE_VERIFYING_KEY);
|
|
90
|
+
const proof = Proof.fromString(SAMPLE_PROOF);
|
|
91
|
+
|
|
92
|
+
// Verify the proof with the correct public inputs.
|
|
93
|
+
const isValid = verifyingKey.verify(SAMPLE_INPUTS, proof);
|
|
94
|
+
console.log(` VerifyingKey.verify with valid inputs: ${isValid}`); // true
|
|
95
|
+
|
|
96
|
+
// Verify the proof with wrong inputs — this should return false.
|
|
97
|
+
const isInvalid = verifyingKey.verify(["1field", "2field"], proof);
|
|
98
|
+
console.log(` VerifyingKey.verify with wrong inputs: ${isInvalid}`); // false
|
|
99
|
+
|
|
100
|
+
// Batch verification: verify the same proof with its verifying key and inputs in a batch context.
|
|
101
|
+
// VerifyingKey.verifyBatch takes arrays of verifying key strings and a 3D inputs array:
|
|
102
|
+
// [circuit_index][instance_index][field_index]
|
|
103
|
+
const batchResult = VerifyingKey.verifyBatch(
|
|
104
|
+
[SAMPLE_VERIFYING_KEY],
|
|
105
|
+
[[SAMPLE_INPUTS]],
|
|
106
|
+
proof,
|
|
107
|
+
);
|
|
108
|
+
console.log(` VerifyingKey.verifyBatch result: ${batchResult}`); // true
|
|
109
|
+
}
|
|
110
|
+
|
|
76
111
|
// Run a deployment and both online and offline executions.
|
|
77
112
|
async function run(online: boolean = false) {
|
|
78
113
|
// Generate the hello_hello.aleo program source code and inputs.
|
|
@@ -142,6 +177,15 @@ async function run(online: boolean = false) {
|
|
|
142
177
|
console.log(`Program ${programName}/hello executed successfully!`);
|
|
143
178
|
}
|
|
144
179
|
}
|
|
180
|
+
|
|
181
|
+
console.log("");
|
|
182
|
+
console.log("// --- STEP 4: Verify a standalone SNARK proof. --- //");
|
|
183
|
+
// snarkVerify and snarkVerifyBatch let you verify a proof from any Varuna circuit directly,
|
|
184
|
+
// without requiring an on-chain program execution. This is useful when you receive a proof
|
|
185
|
+
// from an external source and want to verify it independently.
|
|
186
|
+
start = Date.now();
|
|
187
|
+
snarkProofVerification();
|
|
188
|
+
console.log(`✅ SNARK proof verification finished in ${(Date.now() - start)/1000}s`);
|
|
145
189
|
}
|
|
146
190
|
|
|
147
191
|
// Run the offline execution, deployment, and online execution of hello_hello.aleo.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/node`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for node (https://nodejs.org/).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
|
|
9
|
+
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Mon, 08 Dec 2025 22:36:14 GMT
|
|
12
|
+
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
|
+
|
|
14
|
+
# Credits
|
|
15
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In strict assertion mode, non-strict methods behave like their corresponding
|
|
3
|
+
* strict methods. For example, `assert.deepEqual()` will behave like
|
|
4
|
+
* `assert.deepStrictEqual()`.
|
|
5
|
+
*
|
|
6
|
+
* In strict assertion mode, error messages for objects display a diff. In legacy
|
|
7
|
+
* assertion mode, error messages for objects display the objects, often truncated.
|
|
8
|
+
*
|
|
9
|
+
* To use strict assertion mode:
|
|
10
|
+
*
|
|
11
|
+
* ```js
|
|
12
|
+
* import { strict as assert } from 'node:assert';
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ```js
|
|
16
|
+
* import assert from 'node:assert/strict';
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Example error diff:
|
|
20
|
+
*
|
|
21
|
+
* ```js
|
|
22
|
+
* import { strict as assert } from 'node:assert';
|
|
23
|
+
*
|
|
24
|
+
* assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
|
|
25
|
+
* // AssertionError: Expected inputs to be strictly deep-equal:
|
|
26
|
+
* // + actual - expected ... Lines skipped
|
|
27
|
+
* //
|
|
28
|
+
* // [
|
|
29
|
+
* // [
|
|
30
|
+
* // ...
|
|
31
|
+
* // 2,
|
|
32
|
+
* // + 3
|
|
33
|
+
* // - '3'
|
|
34
|
+
* // ],
|
|
35
|
+
* // ...
|
|
36
|
+
* // 5
|
|
37
|
+
* // ]
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
|
|
41
|
+
* environment variables. This will also deactivate the colors in the REPL. For
|
|
42
|
+
* more on color support in terminal environments, read the tty
|
|
43
|
+
* [`getColorDepth()`](https://nodejs.org/docs/latest-v22.x/api/tty.html#writestreamgetcolordepthenv) documentation.
|
|
44
|
+
* @since v15.0.0
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert/strict.js)
|
|
46
|
+
*/
|
|
47
|
+
declare module "assert/strict" {
|
|
48
|
+
import {
|
|
49
|
+
Assert,
|
|
50
|
+
AssertionError,
|
|
51
|
+
AssertionErrorOptions,
|
|
52
|
+
AssertOptions,
|
|
53
|
+
AssertPredicate,
|
|
54
|
+
AssertStrict,
|
|
55
|
+
CallTracker,
|
|
56
|
+
CallTrackerCall,
|
|
57
|
+
CallTrackerReportInformation,
|
|
58
|
+
deepStrictEqual,
|
|
59
|
+
doesNotMatch,
|
|
60
|
+
doesNotReject,
|
|
61
|
+
doesNotThrow,
|
|
62
|
+
fail,
|
|
63
|
+
ifError,
|
|
64
|
+
match,
|
|
65
|
+
notDeepStrictEqual,
|
|
66
|
+
notStrictEqual,
|
|
67
|
+
ok,
|
|
68
|
+
partialDeepStrictEqual,
|
|
69
|
+
rejects,
|
|
70
|
+
strictEqual,
|
|
71
|
+
throws,
|
|
72
|
+
} from "node:assert";
|
|
73
|
+
function strict(value: unknown, message?: string | Error): asserts value;
|
|
74
|
+
namespace strict {
|
|
75
|
+
export {
|
|
76
|
+
Assert,
|
|
77
|
+
AssertionError,
|
|
78
|
+
AssertionErrorOptions,
|
|
79
|
+
AssertOptions,
|
|
80
|
+
AssertPredicate,
|
|
81
|
+
AssertStrict,
|
|
82
|
+
CallTracker,
|
|
83
|
+
CallTrackerCall,
|
|
84
|
+
CallTrackerReportInformation,
|
|
85
|
+
deepStrictEqual,
|
|
86
|
+
deepStrictEqual as deepEqual,
|
|
87
|
+
doesNotMatch,
|
|
88
|
+
doesNotReject,
|
|
89
|
+
doesNotThrow,
|
|
90
|
+
fail,
|
|
91
|
+
ifError,
|
|
92
|
+
match,
|
|
93
|
+
notDeepStrictEqual,
|
|
94
|
+
notDeepStrictEqual as notDeepEqual,
|
|
95
|
+
notStrictEqual,
|
|
96
|
+
notStrictEqual as notEqual,
|
|
97
|
+
ok,
|
|
98
|
+
partialDeepStrictEqual,
|
|
99
|
+
rejects,
|
|
100
|
+
strict,
|
|
101
|
+
strictEqual,
|
|
102
|
+
strictEqual as equal,
|
|
103
|
+
throws,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export = strict;
|
|
107
|
+
}
|
|
108
|
+
declare module "node:assert/strict" {
|
|
109
|
+
import strict = require("assert/strict");
|
|
110
|
+
export = strict;
|
|
111
|
+
}
|