-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gh-pages): fix missing pkg files
- Loading branch information
Showing
11 changed files
with
1,534 additions
and
0 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,8 @@ | ||
## Aleo Testnet2 Wasm Suite | ||
|
||
A few simple functions for interacting with Aleo testnet2 addresses and signatures. | ||
|
||
### Setup | ||
|
||
1. Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) | ||
1. `wasm-pack build --release --target web` |
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,72 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Generate a testnet2 address from a private key | ||
* @param {string} private_key | ||
* @returns {string} | ||
*/ | ||
export function testnet2_address(private_key: string): string; | ||
/** | ||
* Check if a testnet2 address parses successfully | ||
* @param {string} address2 | ||
* @returns {boolean} | ||
*/ | ||
export function check_testnet2_address(address2: string): boolean; | ||
/** | ||
* Generate a mainnet address from a mainnet private key | ||
* @param {string} private_key | ||
* @returns {string} | ||
*/ | ||
export function mainnet_address(private_key: string): string; | ||
/** | ||
* Sign a message with a mainnet private key | ||
* @param {string} private_key | ||
* @param {string} message | ||
* @returns {string} | ||
*/ | ||
export function testnet2_sign(private_key: string, message: string): string; | ||
/** | ||
* Verify a signature with a testnet2 address and message | ||
* @param {string} address | ||
* @param {string} message | ||
* @param {string} signature | ||
* @returns {boolean} | ||
*/ | ||
export function testnet2_verify(address: string, message: string, signature: string): boolean; | ||
|
||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
|
||
export interface InitOutput { | ||
readonly memory: WebAssembly.Memory; | ||
readonly testnet2_address: (a: number, b: number, c: number) => void; | ||
readonly check_testnet2_address: (a: number, b: number) => number; | ||
readonly mainnet_address: (a: number, b: number, c: number) => void; | ||
readonly testnet2_sign: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly testnet2_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; | ||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number; | ||
readonly __wbindgen_malloc: (a: number, b: number) => number; | ||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; | ||
readonly __wbindgen_free: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_exn_store: (a: number) => void; | ||
} | ||
|
||
export type SyncInitInput = BufferSource | WebAssembly.Module; | ||
/** | ||
* Instantiates the given `module`, which can either be bytes or | ||
* a precompiled `WebAssembly.Module`. | ||
* | ||
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. | ||
* | ||
* @returns {InitOutput} | ||
*/ | ||
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; | ||
|
||
/** | ||
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and | ||
* for everything else, calls `WebAssembly.instantiate` directly. | ||
* | ||
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated. | ||
* | ||
* @returns {Promise<InitOutput>} | ||
*/ | ||
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>; |
Oops, something went wrong.