-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from AleoHQ/feat/sdk-create-aleo-app
commit sdk and create-aleo-app docs
- Loading branch information
Showing
4 changed files
with
1,299 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
id: overview | ||
title: Aleo SDK | ||
sidebar_label: Overview | ||
--- | ||
|
||
|
||
The [Aleo SDK](https://github.com/AleoHQ/sdk) provides tools for building zero knowledge applications. It consists of | ||
several TypeScript & JavaScript libraries which provide the following functionality: | ||
1. [Aleo account management](https://aleo.tools/account) | ||
2. [Web-based program execution and deployment](https://aleo.tools/develop) | ||
3. [Aleo credit transfers](https://aleo.tools/transfer) | ||
4. [Management of program state and data](https://aleo.tools/record) | ||
5. [Communication with the Aleo network](https://aleo.tools/rest) | ||
|
||
All of this functionality is demonstrated on [Aleo.tools](https://aleo.tools). | ||
|
||
|
||
The Aleo SDK is divided into three Typescript/Javascript packages | ||
|
||
## 1. [Aleo SDK](./typescript/00_sdk_overview.md) - Build Zero Knowledge Web Apps | ||
<!-- markdown-link-check-disable --> | ||
<a href="https://www.npmjs.com/package/@aleohq/sdk"> <img alt="Aleo SDK" src="https://img.shields.io/npm/l/%40aleohq%2Fsdk?label=NPM%20-%20Aleo%20SDK&labelColor=green&color=blue" /></a> | ||
<!-- markdown-link-check-enable --> | ||
|
||
|
||
The official Aleo SDK providing Javascript/Typescript tools for creating zero knowledge app. | ||
|
||
### ⚡ Build your own app | ||
|
||
Start here with the [documentation](./typescript/00_sdk_overview.md) and follow the instructions to install the [Aleo SDK](https://github.com/AleoHQ/sdk/tree/testnet3/sdk#readme) to get started building your | ||
first zero knowledge web app. | ||
|
||
#### Source: [`sdk/sdk`](https://github.com/AleoHQ/sdk/tree/testnet3/sdk) | ||
|
||
|
||
## 2. [Create-Aleo-App](./create-aleo-app/00_app_installation.md) - Zero Knowledge Web App Examples | ||
<!-- markdown-link-check-disable --> | ||
<a href="https://www.npmjs.com/package/create-aleo-app"> <img alt="Create Aleo App" src="https://img.shields.io/npm/l/create-aleo-app?label=NPM%20-%20Create-Aleo-App&labelColor=green&color=blue" /></a> | ||
<!-- markdown-link-check-enable --> | ||
|
||
Create-aleo-app provides zero-knowledge web app examples in common web frameworks such as React. Developers looking to | ||
start with working examples should start here. | ||
|
||
### ⚡ Build your own app | ||
|
||
|
||
You can start with a template by running | ||
```bash | ||
npm create aleo-app@latest | ||
``` | ||
|
||
#### Source: [`sdk/create-aleo-app`](https://github.com/AleoHQ/sdk/tree/testnet3/create-aleo-app) | ||
|
||
## 3. [Aleo-Wasm](./wasm/00_wasm_installation.md) - Zero Knowledge Algorithms in JavaScript + WebAssembly | ||
<!-- markdown-link-check-disable --> | ||
<a href="https://www.npmjs.com/package/@aleohq/wasm"> <img alt="Create Aleo App" src="https://img.shields.io/npm/l/%40aleohq%2Fwasm?label=NPM%20-%20Aleo%20Wasm&labelColor=green&color=blue" /></a> | ||
<a href="https://www.npmjs.com/package/@aleohq/nodejs"> <img alt="Create Aleo App" src="https://img.shields.io/npm/l/%40aleohq%2Fnodejs?label=NPM%20-%20Aleo%20Nodejs&labelColor=green&color=blue" /></a> | ||
<a href="https://crates.io/crates/aleo-wasm"> <img alt="Aleo-Wasm" src="https://img.shields.io/crates/v/aleo-wasm.svg?color=neon" /></a> | ||
<!-- markdown-link-check-enable --> | ||
|
||
Aleo Wasm is a Rust crate which compiles Aleo code responsible for creating and executing zero knowledge programs into | ||
WebAssembly. | ||
|
||
When compiled with `wasm-pack` JavaScript bindings are generated for the WebAssembly allowing Aleo zero | ||
knowledge programs to be used in the browser ande NodeJS. This package is available on NPM (linked above). The | ||
[documentation](./wasm/00_wasm_installation.md) provides instructions for compiling this [crate](https://github.com/AleoHQ/sdk/tree/testnet3/wasm) and using it in web projects for those interested in building from | ||
source. | ||
|
||
❗ Currently program execution is only available in web Browsers. However, account, program and data management within | ||
NodeJS is functional. | ||
|
||
Source: [`sdk/wasm`](https://github.com/AleoHQ/sdk/tree/testnet3/wasm) | ||
|
||
## 📚 Documentation | ||
|
||
#### [API Documentation](https://developer.aleo.org) | ||
API Documentation, tutorials for the Aleo SDK, and documentation on how to build Leo and Aleo Instructions programs can | ||
be found on the [Aleo Developer Docs](https://developer.aleo.org) page. | ||
|
||
#### [SDK Readme](https://github.com/AleoHQ/sdk/tree/testnet3/sdk#readme) | ||
The SDK Readme provides concepts core to executing zero knowledge programs in the web and several detailed examples of | ||
how to use the SDK to build web apps using Aleo. | ||
|
||
#### [Aleo Wasm Readme](https://github.com/AleoHQ/sdk/tree/testnet3/wasm#readme) | ||
The Aleo Wasm Readme provides instructions for compiling the Aleo Wasm crate and using it in web projects. Those who | ||
want to build from source or create their own WebAssembly bindings should start here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
id: installation | ||
title: Create Aleo App | ||
sidebar_label: Installation | ||
--- | ||
|
||
<a href="https://www.npmjs.com/package/create-aleo-app"> <img alt="Create Aleo App" src="https://img.shields.io/npm/l/create-aleo-app?label=NPM%20-%20Create-Aleo-App&labelColor=green&color=blue" /></a> | ||
|
||
## Scaffolding Your First Aleo Project | ||
|
||
:::note | ||
**Compatibility:** | ||
[Node.js](https://nodejs.org/en/) version 18+ | ||
::: | ||
|
||
With NPM: | ||
|
||
```bash | ||
$ npm create aleo-app@latest | ||
``` | ||
|
||
Then follow the prompts! | ||
|
||
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold an Aleo + React project, run: | ||
|
||
```bash | ||
# npm 6.x | ||
npm create aleo-app@latest my-aleo-app --template react | ||
|
||
# npm 7+, extra double-dash is needed: | ||
npm create aleo-app@latest my-aleo-app -- --template react | ||
``` | ||
|
||
Currently supported template presets include: | ||
|
||
- `react` | ||
|
||
You can use `.` for the project name to scaffold in the current directory. | ||
|
||
## More Information | ||
|
||
Based off of create-vite: https://github.com/vitejs/vite/tree/main/packages/create-vite |
Oops, something went wrong.