Skip to content

Commit

Permalink
Update Aleo SDK package readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iamalwaysuncomfortable committed Aug 10, 2023
1 parent c803106 commit 057fb3f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aleo"
version = "0.5.1"
version = "0.5.5"
authors = [ "The Aleo Team <hello@aleo.org>" ]
description = "Aleo"
homepage = "https://aleo.org"
Expand Down
27 changes: 15 additions & 12 deletions sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,31 @@ and node.js.
Aleo provides the ability to run programs in zero knowledge. The Aleo SDK provides the tools to use these programs
within the browser and all other levels of the web stack to build privacy protecting applications.

The Aleo SDK provides:
* Tools for executing, deploying, and interacting with Aleo programs in the browser
* Management of program state and data
* Aleo account creation and Aleo account data management
* Communication with the Aleo network
What the Aleo SDK provides (Click to see examples):
* [Tools for executing, deploying, and interacting with Aleo programs in the browser](https://aleo.tools/develop)
* [Aleo account creation and Aleo account data management](https://aleo.tools/account)
* [Management of program state and data](https://aleo.tools/record)
* [Communication with the Aleo network](https://aleo.tools/rest)

This package is published at [**@aleohq/sdk**](https://www.npmjs.com/package/@aleohq/sdk) and makes use of
[**@aleohq/wasm**](https://www.npmjs.com/package/@aleohq/wasm) under the hood.

## Build Guide

1. To build the project, go to the project's root and execute `npm install && npm run build`.
To build the project from source, go to the project's root and execute `npm install && npm run build`.

## Documentation

1. To view the documentation, open `docs/index.html`.
2. To regenerate the documentation, run `npx jsdoc --configure jsdoc.json --verbose`
API documentation for this package can be found on the [Aleo Developer Hub](https://developer.aleo.org/sdk/typescript/overview).

## Aleo Tools
To view the documentation locally, open `docs/index.html`. To regenerate the documentation, run `npx jsdoc --configure jsdoc.json --verbose`

[Aleo SDK account generator](https://aleohq.github.io/aleo/)
## Usage

[Aleo Home](https://www.aleo.org/)
This SDK is used to power [Aleo.tools](https://aleo.tools/develop). Aleo.tools is open source and can be used as a
reference for how to use the SDK to build your own zero knowledge web app.

You can visit the [SnarkVM repo](https://github.com/AleoHQ/snarkVM) and [SnarkOS repo](https://github.com/AleoHQ/snarkOS) to go deep into the code of aleo infrastructure
Sources can be found here: https://github.com/AleoHQ/sdk/tree/testnet3/website

You can visit the [SnarkVM repo](https://github.com/AleoHQ/snarkVM) and [SnarkOS repo](https://github.com/AleoHQ/snarkOS)
if you're interested in learning more about the architecture that powers the Aleo SDK.
7 changes: 6 additions & 1 deletion sdk/src/function-key-provider.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { ProvingKey, VerifyingKey } from ".";
type FunctionKeyPair = [ProvingKey, VerifyingKey];
type CachedKeyPair = [Uint8Array, Uint8Array];
type AleoKeyProviderInitParams = {
proverUri?: string;
verifierUri?: string;
cacheKey?: string;
};
/**
* Interface for record search parameters. This allows for arbitrary search parameters to be passed to record provider
* implementations.
Expand Down Expand Up @@ -272,4 +277,4 @@ declare class AleoKeyProvider implements FunctionKeyProvider {
*/
feeKeys(): Promise<FunctionKeyPair | Error>;
}
export { AleoKeyProvider, AleoKeyProviderParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams };
export { AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams };
2 changes: 1 addition & 1 deletion sdk/src/function-key-provider.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions sdk/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ import { Output } from "./models/output";
import { Transaction } from "./models/transaction";
import { Transition } from "./models/transition";
import { DevServerClient } from "./dev-server-client";
import { AleoKeyProvider, AleoKeyProviderParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider";
import { AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider";
import { BlockHeightSearch, NetworkRecordProvider, RecordProvider, RecordSearchParams } from "./record-provider";
import { ProgramManager } from "./program-manager";
/**
* Initialize Aleo WebAssembly into the browser. The SDK requires its Wasm Instance to be initialized before operating
* so this function must be called before any other SDK functions are called.
*/
import { Address, ExecutionResponse, PrivateKey, PrivateKeyCiphertext, Program, ProvingKey, RecordCiphertext, RecordPlaintext, Signature, Transaction as WasmTransaction, ViewKey, VerifyingKey } from '@aleohq/nodejs';
export { Account, Address, AleoKeyProvider, AleoKeyProviderParams, AleoNetworkClient, Block, BlockHeightSearch, CachedKeyPair, DevServerClient, Execution, ExecutionResponse, FunctionKeyPair, FunctionKeyProvider, Input, KeySearchParams, NetworkRecordProvider, PrivateKey, PrivateKeyCiphertext, Program, ProgramImports, ProvingKey, Output, RecordCiphertext, RecordPlaintext, RecordProvider, RecordSearchParams, Signature, Transaction, Transition, VerifyingKey, ViewKey, WasmTransaction, CREDITS_PROGRAM_KEYS, KEY_STORE, logAndThrow };
declare function initializeWasm(): Promise<import("@aleohq/wasm").InitOutput>;
import { Address, ExecutionResponse, PrivateKey, PrivateKeyCiphertext, Program, ProvingKey, RecordCiphertext, RecordPlaintext, ProgramManager as ProgramManagerBase, Signature, Transaction as WasmTransaction, ViewKey, VerifyingKey, initThreadPool } from '@aleohq/wasm';
export { Account, Address, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, Block, BlockHeightSearch, DevServerClient, Execution, ExecutionResponse, FunctionKeyPair, FunctionKeyProvider, Input, KeySearchParams, NetworkRecordProvider, PrivateKey, PrivateKeyCiphertext, Program, ProgramImports, ProgramManager, ProgramManagerBase, ProvingKey, Output, RecordCiphertext, RecordPlaintext, RecordProvider, RecordSearchParams, Signature, Transaction, Transition, VerifyingKey, ViewKey, WasmTransaction, CREDITS_PROGRAM_KEYS, KEY_STORE, initThreadPool, initializeWasm, logAndThrow };

0 comments on commit 057fb3f

Please sign in to comment.