Skip to content

Commit

Permalink
Force added pkg/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
RGGH committed Nov 4, 2024
0 parents commit c16010b
Show file tree
Hide file tree
Showing 11 changed files with 697 additions and 0 deletions.
244 changes: 244 additions & 0 deletions Cargo.lock

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

15 changes: 15 additions & 0 deletions Cargo.toml
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"]

1 change: 1 addition & 0 deletions pkg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
51 changes: 51 additions & 0 deletions pkg/bitcoin_hashing_wasm.d.ts
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>;
Loading

0 comments on commit c16010b

Please sign in to comment.