-
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.
- Loading branch information
0 parents
commit c16010b
Showing
11 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
[package] | ||
name = "bitcoin_hashing_wasm" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
bs58 = "0.5.1" | ||
hex = "0.4.3" | ||
ripemd = "0.1.3" | ||
sha2 = "0.10.8" | ||
wasm-bindgen = "0.2.95" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
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 @@ | ||
* |
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,51 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {Uint8Array} input | ||
* @returns {Uint8Array} | ||
*/ | ||
export function sha256(input: Uint8Array): Uint8Array; | ||
/** | ||
* @param {Uint8Array} input | ||
* @returns {Uint8Array} | ||
*/ | ||
export function ripemd160(input: Uint8Array): Uint8Array; | ||
/** | ||
* @param {string} public_key_hex | ||
* @returns {string} | ||
*/ | ||
export function generate_bitcoin_address(public_key_hex: string): string; | ||
|
||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
|
||
export interface InitOutput { | ||
readonly memory: WebAssembly.Memory; | ||
readonly sha256: (a: number, b: number, c: number) => void; | ||
readonly ripemd160: (a: number, b: number, c: number) => void; | ||
readonly generate_bitcoin_address: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number; | ||
readonly __wbindgen_malloc: (a: number, b: number) => number; | ||
readonly __wbindgen_free: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; | ||
} | ||
|
||
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.