create-leo-app 0.0.13 → 0.7.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 +2 -3
- package/template-node/index.js +0 -0
- package/template-react-leo/README.md +2 -2
- package/template-react-ts/README.md +2 -2
- package/template-extension/.gitignore +0 -2
- package/template-extension/package.json +0 -15
- package/template-extension/rollup.config.js +0 -21
- package/template-extension/src/offscreen.js +0 -1
- package/template-extension/src/service_worker.js +0 -20
- package/template-extension/src/worker.js +0 -34
- package/template-extension/static/manifest.json +0 -16
- package/template-extension/static/offscreen.html +0 -9
- package/template-nextjs-ts/_gitignore +0 -35
- package/template-nextjs-ts/next-env.d.ts +0 -5
- package/template-nextjs-ts/next.config.js +0 -32
- package/template-nextjs-ts/package.json +0 -24
- package/template-nextjs-ts/public/aleo.svg +0 -8
- package/template-nextjs-ts/public/next.svg +0 -1
- package/template-nextjs-ts/src/app/favicon.ico +0 -0
- package/template-nextjs-ts/src/app/globals.css +0 -126
- package/template-nextjs-ts/src/app/layout.tsx +0 -22
- package/template-nextjs-ts/src/app/page.module.css +0 -160
- package/template-nextjs-ts/src/app/page.tsx +0 -94
- package/template-nextjs-ts/src/app/worker.ts +0 -47
- package/template-nextjs-ts/tsconfig.json +0 -27
- package/template-node/_gitignore +0 -24
- package/template-node/package.json +0 -12
- package/template-node-ts/_gitignore +0 -24
- package/template-node-ts/package.json +0 -19
- package/template-node-ts/rollup.config.js +0 -19
- package/template-node-ts/src/index.ts +0 -66
- package/template-node-ts/tsconfig.json +0 -15
- package/template-offline-public-transaction-ts/_gitignore +0 -24
- package/template-offline-public-transaction-ts/package.json +0 -19
- package/template-offline-public-transaction-ts/rollup.config.js +0 -19
- package/template-offline-public-transaction-ts/src/helpers.ts +0 -70
- package/template-offline-public-transaction-ts/src/index.ts +0 -171
- package/template-offline-public-transaction-ts/tsconfig.json +0 -15
- package/template-react-leo/.babelrc +0 -6
- package/template-react-leo/.eslintrc.cjs +0 -20
- package/template-react-leo/_gitignore +0 -24
- package/template-react-leo/_headers +0 -3
- package/template-react-leo/helloworld/.env.example +0 -2
- package/template-react-leo/helloworld/.gitignore +0 -5
- package/template-react-leo/helloworld/README.md +0 -13
- package/template-react-leo/helloworld/build/main.aleo +0 -7
- package/template-react-leo/helloworld/build/program.json +0 -6
- package/template-react-leo/helloworld/inputs/helloworld.in +0 -4
- package/template-react-leo/helloworld/program.json +0 -6
- package/template-react-leo/helloworld/src/main.leo +0 -7
- package/template-react-leo/index.html +0 -88
- package/template-react-leo/install.sh +0 -30
- package/template-react-leo/package.json +0 -44
- package/template-react-leo/public/favicon.ico +0 -0
- package/template-react-leo/src/App.css +0 -42
- package/template-react-leo/src/App.jsx +0 -103
- package/template-react-leo/src/assets/aleo.svg +0 -5
- package/template-react-leo/src/assets/react.svg +0 -1
- package/template-react-leo/src/index.css +0 -69
- package/template-react-leo/src/main.jsx +0 -10
- package/template-react-leo/src/workers/AleoWorker.js +0 -20
- package/template-react-leo/src/workers/worker.js +0 -72
- package/template-react-leo/vite.config.js +0 -16
- package/template-react-leo/webpack.config.js +0 -102
- package/template-react-managed-worker/.babelrc +0 -6
- package/template-react-managed-worker/.eslintrc.cjs +0 -20
- package/template-react-managed-worker/_gitignore +0 -24
- package/template-react-managed-worker/index.html +0 -88
- package/template-react-managed-worker/package.json +0 -41
- package/template-react-managed-worker/public/favicon.ico +0 -0
- package/template-react-managed-worker/src/App.css +0 -42
- package/template-react-managed-worker/src/App.jsx +0 -78
- package/template-react-managed-worker/src/assets/aleo.png +0 -0
- package/template-react-managed-worker/src/assets/react.svg +0 -1
- package/template-react-managed-worker/src/index.css +0 -69
- package/template-react-managed-worker/src/main.jsx +0 -10
- package/template-react-managed-worker/vite.config.js +0 -20
- package/template-react-managed-worker/webpack.config.js +0 -90
- package/template-react-ts/.babelrc +0 -7
- package/template-react-ts/.eslintrc.cjs +0 -20
- package/template-react-ts/_gitignore +0 -24
- package/template-react-ts/_headers +0 -3
- package/template-react-ts/helloworld/.env.example +0 -2
- package/template-react-ts/helloworld/.gitignore +0 -5
- package/template-react-ts/helloworld/README.md +0 -13
- package/template-react-ts/helloworld/build/main.aleo +0 -7
- package/template-react-ts/helloworld/build/program.json +0 -6
- package/template-react-ts/helloworld/inputs/helloworld.in +0 -4
- package/template-react-ts/helloworld/program.json +0 -6
- package/template-react-ts/helloworld/src/main.leo +0 -7
- package/template-react-ts/index.html +0 -88
- package/template-react-ts/install.sh +0 -30
- package/template-react-ts/package.json +0 -49
- package/template-react-ts/public/favicon.ico +0 -0
- package/template-react-ts/src/App.css +0 -42
- package/template-react-ts/src/App.tsx +0 -103
- package/template-react-ts/src/assets/aleo.svg +0 -5
- package/template-react-ts/src/assets/react.svg +0 -1
- package/template-react-ts/src/custom.d.ts +0 -16
- package/template-react-ts/src/index.css +0 -69
- package/template-react-ts/src/main.tsx +0 -10
- package/template-react-ts/src/workers/AleoWorker.ts +0 -21
- package/template-react-ts/src/workers/worker.ts +0 -73
- package/template-react-ts/tsconfig.json +0 -16
- package/template-react-ts/vite.config.ts +0 -16
- package/template-react-ts/webpack.config.ts +0 -112
- package/template-vanilla/_gitignore +0 -24
- package/template-vanilla/_headers +0 -3
- package/template-vanilla/index.html +0 -13
- package/template-vanilla/javascript.svg +0 -1
- package/template-vanilla/main.js +0 -48
- package/template-vanilla/package.json +0 -16
- package/template-vanilla/public/aleo.svg +0 -76
- package/template-vanilla/public/vite.svg +0 -1
- package/template-vanilla/style.css +0 -97
- package/template-vanilla/vite.config.js +0 -12
- package/template-vanilla/worker.js +0 -95
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ts-node
|
|
2
|
-
import CopyPlugin from "copy-webpack-plugin";
|
|
3
|
-
import TerserPlugin from "terser-webpack-plugin";
|
|
4
|
-
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
5
|
-
|
|
6
|
-
import path from "path";
|
|
7
|
-
|
|
8
|
-
const appConfig = {
|
|
9
|
-
mode: "production",
|
|
10
|
-
entry: {
|
|
11
|
-
index: "./src/main.tsx",
|
|
12
|
-
},
|
|
13
|
-
output: {
|
|
14
|
-
path: path.resolve("dist"),
|
|
15
|
-
filename: "[name].bundle.js",
|
|
16
|
-
},
|
|
17
|
-
resolve: {
|
|
18
|
-
extensions: [".ts", ".tsx", ".js", ".wasm", ".jsx"],
|
|
19
|
-
},
|
|
20
|
-
devServer: {
|
|
21
|
-
port: 3000,
|
|
22
|
-
headers: {
|
|
23
|
-
"Cross-Origin-Opener-Policy": "same-origin",
|
|
24
|
-
"Cross-Origin-Embedder-Policy": "require-corp",
|
|
25
|
-
},
|
|
26
|
-
client: {
|
|
27
|
-
overlay: false,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
module: {
|
|
31
|
-
rules: [
|
|
32
|
-
{
|
|
33
|
-
test: /\.(ts|tsx|js|jsx)$/,
|
|
34
|
-
//exclude: /node_modules/,
|
|
35
|
-
use: {
|
|
36
|
-
loader: "babel-loader",
|
|
37
|
-
// options: {
|
|
38
|
-
// presets: [
|
|
39
|
-
// '@babel/preset-env',
|
|
40
|
-
// '@babel/preset-react',
|
|
41
|
-
// '@babel/preset-typescript',
|
|
42
|
-
// ],
|
|
43
|
-
// },
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
test: /\.css$/,
|
|
48
|
-
use: ["style-loader", "css-loader"],
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
test: /\.(png|jpe?g|gif)$/i,
|
|
52
|
-
use: [
|
|
53
|
-
{
|
|
54
|
-
loader: "file-loader",
|
|
55
|
-
options: {
|
|
56
|
-
name: "[path][name].[ext]",
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
test: /\.svg$/,
|
|
63
|
-
use: [
|
|
64
|
-
{
|
|
65
|
-
loader: "svg-url-loader",
|
|
66
|
-
options: {
|
|
67
|
-
limit: 8192,
|
|
68
|
-
noquotes: true,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
test: /\.aleo$/i,
|
|
75
|
-
use: 'raw-loader',
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
plugins: [
|
|
80
|
-
new CopyPlugin({
|
|
81
|
-
patterns: [{ from: "public", to: "public" }, { from: "_headers", to: "." },
|
|
82
|
-
{ from: 'src/assets', to: 'dist/assets' }
|
|
83
|
-
],
|
|
84
|
-
}),
|
|
85
|
-
new HtmlWebpackPlugin({
|
|
86
|
-
template: "./index.html",
|
|
87
|
-
}),
|
|
88
|
-
],
|
|
89
|
-
performance: {
|
|
90
|
-
hints: false,
|
|
91
|
-
maxAssetSize: 13 * 1024 * 1024, // 12 MiB
|
|
92
|
-
maxEntrypointSize: 13 * 1024 * 1024, // 12 MiB
|
|
93
|
-
},
|
|
94
|
-
optimization: {
|
|
95
|
-
minimize: true,
|
|
96
|
-
minimizer: [new TerserPlugin({
|
|
97
|
-
terserOptions: {
|
|
98
|
-
module: true,
|
|
99
|
-
}
|
|
100
|
-
})],
|
|
101
|
-
},
|
|
102
|
-
stats: {
|
|
103
|
-
warnings: false,
|
|
104
|
-
},
|
|
105
|
-
experiments: {
|
|
106
|
-
asyncWebAssembly: true,
|
|
107
|
-
topLevelAwait: true,
|
|
108
|
-
},
|
|
109
|
-
devtool: "source-map",
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export default [appConfig];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/aleo.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Leo App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/main.js"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#F7DF1E" d="M0 0h256v256H0V0Z"></path><path d="m67.312 213.932l19.59-11.856c3.78 6.701 7.218 12.371 15.465 12.371c7.905 0 12.89-3.092 12.89-15.12v-81.798h24.057v82.138c0 24.917-14.606 36.259-35.916 36.259c-19.245 0-30.416-9.967-36.087-21.996m85.07-2.576l19.588-11.341c5.157 8.421 11.859 14.607 23.715 14.607c9.969 0 16.325-4.984 16.325-11.858c0-8.248-6.53-11.17-17.528-15.98l-6.013-2.58c-17.357-7.387-28.87-16.667-28.87-36.257c0-18.044 13.747-31.792 35.228-31.792c15.294 0 26.292 5.328 34.196 19.247l-18.732 12.03c-4.125-7.389-8.591-10.31-15.465-10.31c-7.046 0-11.514 4.468-11.514 10.31c0 7.217 4.468 10.14 14.778 14.608l6.014 2.577c20.45 8.765 31.963 17.7 31.963 37.804c0 21.654-17.012 33.51-39.867 33.51c-22.339 0-36.774-10.654-43.819-24.574"></path></svg>
|
package/template-vanilla/main.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
|
-
import javascriptLogo from "./javascript.svg";
|
|
3
|
-
import aleoLogo from "/aleo.svg";
|
|
4
|
-
import viteLogo from "/vite.svg";
|
|
5
|
-
|
|
6
|
-
const worker = new Worker("worker.js", {
|
|
7
|
-
type: "module",
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
worker.onmessage = function (e) {
|
|
11
|
-
console.log(e.data);
|
|
12
|
-
alert(e.data);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
window.execute = () => {
|
|
16
|
-
worker.postMessage("execute");
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
window.key = () => {
|
|
20
|
-
worker.postMessage("key");
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
window.deploy = () => {
|
|
24
|
-
worker.postMessage("deploy");
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
document.querySelector("#app").innerHTML = `
|
|
28
|
-
<div>
|
|
29
|
-
<a href="https://vitejs.dev" target="_blank">
|
|
30
|
-
<img src="${viteLogo}" class="logo" alt="Vite logo" />
|
|
31
|
-
</a>
|
|
32
|
-
<a href="https://aleo.org/" target="_blank">
|
|
33
|
-
<img src="${aleoLogo}" class="logo" alt="Aleo logo" />
|
|
34
|
-
</a>
|
|
35
|
-
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
|
|
36
|
-
<img src="${javascriptLogo}" class="logo vanilla" alt="JavaScript logo" />
|
|
37
|
-
</a>
|
|
38
|
-
<h1>Hello Aleo!</h1>
|
|
39
|
-
<div class="card">
|
|
40
|
-
<button onclick="window.execute()">Call Execute Function</button>
|
|
41
|
-
<button onclick="window.key()">Get Private Key</button>
|
|
42
|
-
<button onclick="window.deploy()">Deploy HelloWorld Program</button>
|
|
43
|
-
</div>
|
|
44
|
-
<p class="read-the-docs">
|
|
45
|
-
Click on the Aleo logo to learn more
|
|
46
|
-
</p>
|
|
47
|
-
</div>
|
|
48
|
-
`;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "aleo-starter",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@provablehq/sdk": "^0.6.0",
|
|
13
|
-
"tslib": "^2.6.2",
|
|
14
|
-
"vite": "^4.4.12"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
-
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
-
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
width="896.000000pt" height="896.000000pt" viewBox="0 0 896.000000 896.000000"
|
|
6
|
-
preserveAspectRatio="xMidYMid meet">
|
|
7
|
-
<metadata>
|
|
8
|
-
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
-
</metadata>
|
|
10
|
-
<g transform="translate(0.000000,896.000000) scale(0.100000,-0.100000)"
|
|
11
|
-
fill="#ffffff" stroke="none">
|
|
12
|
-
<path d="M3504 8848 c-21 -62 -39 -117 -40 -123 -2 -8 -162 -483 -179 -533 -2
|
|
13
|
-
-7 -5 -16 -6 -20 -1 -4 -15 -43 -31 -87 -16 -44 -29 -81 -29 -82 0 -2 -2 -8
|
|
14
|
-
-4 -15 -19 -54 -224 -669 -256 -768 -22 -69 -44 -134 -49 -145 -5 -11 -36
|
|
15
|
-
-103 -70 -205 -33 -102 -63 -192 -67 -200 -3 -8 -7 -19 -8 -25 -4 -13 -125
|
|
16
|
-
-376 -132 -395 -4 -8 -7 -17 -8 -20 -4 -18 -48 -149 -55 -165 -5 -11 -32 -92
|
|
17
|
-
-60 -180 -28 -88 -56 -169 -61 -180 -6 -12 -12 -30 -14 -40 -2 -11 -4 -20 -4
|
|
18
|
-
-20 -2 0 -371 -1097 -376 -1115 -2 -8 -15 -46 -28 -85 -13 -38 -54 -162 -91
|
|
19
|
-
-275 -37 -113 -71 -214 -76 -225 -16 -38 -70 -205 -70 -216 0 -6 6 -9 14 -6 7
|
|
20
|
-
3 19 0 25 -6 6 -6 11 -7 11 -2 0 10 996 12 1006 3 4 -5 -29 -117 -45 -153 -5
|
|
21
|
-
-11 -19 -51 -32 -90 -12 -38 -24 -74 -28 -80 -3 -5 -6 -12 -6 -15 -1 -21 -82
|
|
22
|
-
-247 -90 -252 -5 -4 -7 -8 -3 -8 3 0 -22 -82 -56 -182 l-63 -182 -529 1 c-445
|
|
23
|
-
0 -528 3 -525 14 2 8 6 26 9 41 2 16 8 28 11 28 4 0 8 6 8 13 0 6 26 91 59
|
|
24
|
-
187 32 96 59 177 60 180 0 3 3 12 7 20 6 15 29 87 34 105 1 6 16 48 33 95 17
|
|
25
|
-
47 35 101 41 120 6 19 12 40 13 45 2 6 4 13 5 17 1 4 8 26 17 49 8 23 12 44 9
|
|
26
|
-
47 -5 5 -1044 6 -1050 1 -3 -4 -164 -474 -170 -499 -2 -8 -35 -108 -74 -221
|
|
27
|
-
-38 -114 -71 -215 -73 -225 -3 -17 23 -18 517 -19 286 -1 523 -3 527 -3 3 -1
|
|
28
|
-
-34 -120 -83 -265 -49 -144 -91 -271 -94 -282 -3 -11 -29 -91 -59 -178 -30
|
|
29
|
-
-86 -55 -158 -55 -160 0 -1 -2 -9 -5 -17 -15 -41 -297 -885 -302 -905 -2 -5
|
|
30
|
-
-22 -64 -44 -130 -23 -66 -43 -127 -45 -135 -2 -8 -9 -28 -16 -45 -7 -16 -13
|
|
31
|
-
-32 -14 -35 -1 -3 -8 -25 -15 -50 -7 -25 -14 -47 -15 -50 -1 -3 -7 -18 -14
|
|
32
|
-
-34 -6 -16 -13 -36 -15 -45 -2 -9 -6 -24 -10 -33 -4 -9 -9 -22 -10 -30 -2 -7
|
|
33
|
-
-6 -20 -9 -28 -14 -34 -107 -314 -107 -322 0 -4 238 -8 530 -8 l529 0 12 23
|
|
34
|
-
c7 12 11 22 10 22 -1 0 0 7 3 15 3 8 39 119 81 245 42 127 79 237 82 245 3 8
|
|
35
|
-
7 22 9 31 2 9 9 29 15 45 13 32 16 39 22 69 3 11 15 45 27 75 12 30 24 66 27
|
|
36
|
-
79 2 14 7 29 11 35 3 6 7 16 8 21 2 12 102 313 111 335 4 8 7 17 8 20 1 3 4
|
|
37
|
-
12 7 20 3 8 40 121 82 250 43 129 81 244 86 255 8 18 87 254 93 280 2 6 13 42
|
|
38
|
-
26 80 30 91 31 95 30 98 -1 2 12 38 37 102 4 11 8 22 9 25 0 3 16 50 34 105
|
|
39
|
-
33 101 40 123 41 128 0 1 13 36 28 77 l28 75 2003 1 2003 0 9 -20 c19 -48 695
|
|
40
|
-
-2069 704 -2106 2 -8 4 -16 5 -17 2 -2 3 -6 5 -10 1 -5 4 -15 8 -23 3 -8 29
|
|
41
|
-
-87 57 -175 28 -88 55 -169 60 -180 16 -37 61 -184 58 -188 -2 -2 3 -11 11
|
|
42
|
-
-20 12 -15 64 -17 561 -17 l548 0 -5 23 c-3 12 -10 28 -16 35 -5 6 -7 12 -3
|
|
43
|
-
12 3 0 -3 21 -13 48 -10 26 -19 49 -19 52 -1 7 -11 38 -28 83 -8 20 -14 38
|
|
44
|
-
-13 40 0 1 -2 9 -5 17 -3 8 -46 139 -96 290 -50 151 -94 282 -97 290 -4 8 -7
|
|
45
|
-
17 -7 20 -3 13 -108 327 -115 345 -10 24 -72 206 -75 220 -4 20 -117 360 -126
|
|
46
|
-
380 -8 18 -212 630 -216 648 -1 4 -3 9 -4 12 -1 3 -3 8 -5 13 -1 4 -4 14 -8
|
|
47
|
-
22 -10 28 -51 155 -53 168 -1 8 -6 21 -10 30 -4 9 -8 20 -9 25 -2 4 -3 8 -4
|
|
48
|
-
10 -2 4 -173 512 -177 527 -2 8 -31 96 -65 195 -34 99 -61 186 -62 193 0 6 -3
|
|
49
|
-
12 -7 12 -4 0 -7 6 -7 13 0 10 -413 1255 -430 1297 -3 8 -7 20 -9 25 -3 14
|
|
50
|
-
-104 317 -111 335 -4 8 -7 17 -7 20 -5 16 -68 208 -75 225 -9 20 -50 141 -55
|
|
51
|
-
160 -6 26 -18 62 -26 80 -5 11 -13 36 -19 55 -5 19 -17 55 -26 80 -9 25 -18
|
|
52
|
-
52 -20 60 -2 8 -20 62 -40 120 -20 58 -38 112 -40 120 -6 24 -246 743 -255
|
|
53
|
-
765 -8 17 -73 211 -76 225 0 3 -3 12 -7 20 -7 19 -71 213 -72 220 0 3 -6 15
|
|
54
|
-
-13 28 -7 12 -10 22 -7 22 3 0 -1 16 -9 35 -9 20 -15 38 -16 40 0 3 0 6 0 8 0
|
|
55
|
-
1 -30 88 -65 192 -36 105 -67 197 -69 205 -2 9 -52 159 -111 335 -59 176 -108
|
|
56
|
-
325 -110 330 -1 6 -5 17 -8 25 -18 42 -35 100 -30 100 3 0 1 6 -4 13 -5 6 -15
|
|
57
|
-
31 -23 55 l-13 42 -1013 0 -1012 0 -38 -112z m1289 -858 c4 -4 159 -465 162
|
|
58
|
-
-480 5 -27 120 -358 127 -367 6 -7 8 -13 5 -13 -3 0 15 -60 39 -132 25 -73 47
|
|
59
|
-
-140 49 -148 4 -21 55 -170 65 -195 8 -19 33 -94 35 -105 2 -11 37 -116 45
|
|
60
|
-
-135 9 -21 32 -92 36 -110 1 -5 13 -41 26 -80 14 -38 37 -108 52 -155 15 -47
|
|
61
|
-
30 -92 33 -100 4 -8 7 -17 8 -20 1 -3 4 -12 7 -20 3 -8 18 -53 32 -100 15 -47
|
|
62
|
-
30 -92 33 -100 4 -8 7 -18 8 -22 2 -5 4 -10 5 -13 1 -3 3 -8 4 -12 3 -15 28
|
|
63
|
-
-88 36 -108 4 -11 14 -40 21 -65 7 -25 16 -49 19 -55 6 -8 33 -99 35 -115 1
|
|
64
|
-
-5 25 -74 45 -125 4 -11 13 -38 19 -60 7 -22 16 -49 20 -60 5 -11 14 -38 20
|
|
65
|
-
-60 7 -22 16 -49 21 -60 5 -11 23 -67 41 -125 17 -58 35 -109 39 -115 3 -5 12
|
|
66
|
-
-30 19 -55 6 -25 16 -54 20 -65 5 -11 14 -38 20 -60 7 -22 16 -49 21 -60 9
|
|
67
|
-
-21 91 -272 95 -289 1 -6 5 -18 8 -26 22 -55 44 -130 39 -134 -3 -3 -1 -6 5
|
|
68
|
-
-6 5 0 10 -6 10 -12 0 -7 21 -75 47 -150 25 -76 46 -142 46 -147 0 -5 -696 -9
|
|
69
|
-
-1675 -9 -991 0 -1675 4 -1675 9 0 5 23 77 51 160 28 83 52 156 54 162 1 7 5
|
|
70
|
-
20 8 30 4 9 10 25 14 35 3 9 7 22 9 27 1 6 91 276 199 600 109 325 198 595
|
|
71
|
-
200 600 1 6 5 19 9 30 24 63 34 91 36 100 1 6 4 15 6 20 29 83 116 344 118
|
|
72
|
-
355 4 13 138 421 152 460 3 8 5 15 5 15 0 0 79 234 175 520 96 286 176 528
|
|
73
|
-
179 538 2 10 25 80 51 155 26 75 47 143 47 150 0 6 3 12 7 12 4 0 7 6 7 13 0
|
|
74
|
-
18 86 271 95 277 8 7 505 6 511 0z"/>
|
|
75
|
-
</g>
|
|
76
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
-webkit-text-size-adjust: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
a {
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
color: #646cff;
|
|
20
|
-
text-decoration: inherit;
|
|
21
|
-
}
|
|
22
|
-
a:hover {
|
|
23
|
-
color: #535bf2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
body {
|
|
27
|
-
margin: 0;
|
|
28
|
-
display: flex;
|
|
29
|
-
place-items: center;
|
|
30
|
-
min-width: 320px;
|
|
31
|
-
min-height: 100vh;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h1 {
|
|
35
|
-
font-size: 3.2em;
|
|
36
|
-
line-height: 1.1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#app {
|
|
40
|
-
max-width: 1280px;
|
|
41
|
-
margin: 0 auto;
|
|
42
|
-
padding: 2rem;
|
|
43
|
-
text-align: center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.logo {
|
|
47
|
-
height: 6em;
|
|
48
|
-
padding: 1.5em;
|
|
49
|
-
will-change: filter;
|
|
50
|
-
transition: filter 300ms;
|
|
51
|
-
}
|
|
52
|
-
.logo:hover {
|
|
53
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
54
|
-
}
|
|
55
|
-
.logo.vanilla:hover {
|
|
56
|
-
filter: drop-shadow(0 0 2em #f7df1eaa);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.card {
|
|
60
|
-
padding: 2em;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.read-the-docs {
|
|
64
|
-
color: #888;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
button {
|
|
68
|
-
border-radius: 8px;
|
|
69
|
-
border: 1px solid transparent;
|
|
70
|
-
padding: 0.6em 1.2em;
|
|
71
|
-
font-size: 1em;
|
|
72
|
-
font-weight: 500;
|
|
73
|
-
font-family: inherit;
|
|
74
|
-
background-color: #1a1a1a;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
transition: border-color 0.25s;
|
|
77
|
-
}
|
|
78
|
-
button:hover {
|
|
79
|
-
border-color: #646cff;
|
|
80
|
-
}
|
|
81
|
-
button:focus,
|
|
82
|
-
button:focus-visible {
|
|
83
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media (prefers-color-scheme: light) {
|
|
87
|
-
:root {
|
|
88
|
-
color: #213547;
|
|
89
|
-
background-color: #ffffff;
|
|
90
|
-
}
|
|
91
|
-
a:hover {
|
|
92
|
-
color: #747bff;
|
|
93
|
-
}
|
|
94
|
-
button {
|
|
95
|
-
background-color: #f9f9f9;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
export default defineConfig({
|
|
3
|
-
optimizeDeps: {
|
|
4
|
-
exclude: ["@provablehq/wasm", "@provablehq/sdk"],
|
|
5
|
-
},
|
|
6
|
-
server: {
|
|
7
|
-
headers: {
|
|
8
|
-
"Cross-Origin-Opener-Policy": "same-origin",
|
|
9
|
-
"Cross-Origin-Embedder-Policy": "require-corp",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
});
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Account,
|
|
3
|
-
ProgramManager,
|
|
4
|
-
PrivateKey,
|
|
5
|
-
initThreadPool,
|
|
6
|
-
AleoKeyProvider,
|
|
7
|
-
AleoNetworkClient,
|
|
8
|
-
NetworkRecordProvider,
|
|
9
|
-
} from "@provablehq/sdk";
|
|
10
|
-
|
|
11
|
-
await initThreadPool();
|
|
12
|
-
|
|
13
|
-
// A program name must be unique. To deploy the program, you should change the name from hello_hello.aleo to something else that is unique.
|
|
14
|
-
const hello_hello_program =`
|
|
15
|
-
program hello_hello.aleo;
|
|
16
|
-
|
|
17
|
-
function hello:
|
|
18
|
-
input r0 as u32.public;
|
|
19
|
-
input r1 as u32.private;
|
|
20
|
-
add r0 r1 into r2;
|
|
21
|
-
output r2 as u32.private;`
|
|
22
|
-
|
|
23
|
-
async function localProgramExecution(program, aleoFunction, inputs) {
|
|
24
|
-
const programManager = new ProgramManager();
|
|
25
|
-
|
|
26
|
-
// Create a temporary account for the execution of the program
|
|
27
|
-
const account = new Account();
|
|
28
|
-
programManager.setAccount(account);
|
|
29
|
-
|
|
30
|
-
const executionResponse = await programManager.run(
|
|
31
|
-
program,
|
|
32
|
-
aleoFunction,
|
|
33
|
-
inputs,
|
|
34
|
-
false,
|
|
35
|
-
);
|
|
36
|
-
return executionResponse.getOutputs();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function getPrivateKey() {
|
|
40
|
-
return new PrivateKey().to_string();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async function deployProgram(program) {
|
|
44
|
-
const keyProvider = new AleoKeyProvider();
|
|
45
|
-
keyProvider.useCache(true);
|
|
46
|
-
|
|
47
|
-
// Create a record provider that will be used to find records and transaction data for Aleo programs
|
|
48
|
-
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
|
|
49
|
-
|
|
50
|
-
// Use existing account with funds
|
|
51
|
-
const account = new Account({
|
|
52
|
-
privateKey: "user1PrivateKey",
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const recordProvider = new NetworkRecordProvider(account, networkClient);
|
|
56
|
-
|
|
57
|
-
// Initialize a program manager to talk to the Aleo network with the configured key and record providers
|
|
58
|
-
const programManager = new ProgramManager(
|
|
59
|
-
"https://api.explorer.aleo.org/v1",
|
|
60
|
-
keyProvider,
|
|
61
|
-
recordProvider,
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
programManager.setAccount(account);
|
|
65
|
-
|
|
66
|
-
// Define a fee to pay to deploy the program
|
|
67
|
-
const fee = 1.9; // 1.9 Aleo credits
|
|
68
|
-
|
|
69
|
-
// Deploy the program to the Aleo network
|
|
70
|
-
const tx_id = await programManager.deploy(program, fee);
|
|
71
|
-
|
|
72
|
-
// Optional: Pass in fee record manually to avoid long scan times
|
|
73
|
-
// const feeRecord = "{ owner: aleo1xxx...xxx.private, microcredits: 2000000u64.private, _nonce: 123...789group.public}";
|
|
74
|
-
// const tx_id = await programManager.deploy(program, fee, undefined, feeRecord);
|
|
75
|
-
|
|
76
|
-
return tx_id;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
onmessage = async function (e) {
|
|
80
|
-
if (e.data === "execute") {
|
|
81
|
-
const result = await localProgramExecution(hello_hello_program, "hello", ["5u32", "5u32"]);
|
|
82
|
-
postMessage(result);
|
|
83
|
-
} else if (e.data === "key") {
|
|
84
|
-
const result = getPrivateKey();
|
|
85
|
-
postMessage(result);
|
|
86
|
-
} else if (e.data === "deploy") {
|
|
87
|
-
try {
|
|
88
|
-
const result = await deployProgram(hello_hello_program);
|
|
89
|
-
postMessage(result);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
postMessage({ error: error.message });
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
};
|