-
Notifications
You must be signed in to change notification settings - Fork 572
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
Showing
8 changed files
with
136 additions
and
16 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
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,19 @@ | ||
[package] | ||
name = "ironfish-wasm" | ||
version = "0.1.0" | ||
license = "MPL-2.0" | ||
|
||
authors.workspace = true | ||
edition.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
|
||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
getrandom = { version = "0.2.8", features = ["js"] } # need to explicitly enable the `js` feature in order to run in a browser | ||
ironfish = { version = "0.3.0", path = "../ironfish-rust" } | ||
wasm-bindgen = "0.2.95" |
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,26 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen] | ||
#[derive(Debug)] | ||
pub struct IronfishError(ironfish::errors::IronfishError); | ||
|
||
impl<T> From<T> for IronfishError | ||
where | ||
ironfish::errors::IronfishError: From<T>, | ||
{ | ||
fn from(e: T) -> Self { | ||
Self(ironfish::errors::IronfishError::from(e)) | ||
} | ||
} | ||
|
||
impl AsRef<ironfish::errors::IronfishError> for IronfishError { | ||
fn as_ref(&self) -> &ironfish::errors::IronfishError { | ||
&self.0 | ||
} | ||
} | ||
|
||
impl AsRef<ironfish::errors::IronfishErrorKind> for IronfishError { | ||
fn as_ref(&self) -> &ironfish::errors::IronfishErrorKind { | ||
&self.0.kind | ||
} | ||
} |
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,12 @@ | ||
#![warn(clippy::dbg_macro)] | ||
#![warn(clippy::print_stderr)] | ||
#![warn(clippy::print_stdout)] | ||
#![warn(unreachable_pub)] | ||
#![warn(unused_crate_dependencies)] | ||
#![warn(unused_macro_rules)] | ||
#![warn(unused_qualifications)] | ||
|
||
// The getrandom dependency exists only to ensure that the `js` feature is enabled | ||
use getrandom as _; | ||
|
||
pub mod errors; |
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 |
---|---|---|
|
@@ -108,6 +108,36 @@ who = "Andrea <[email protected]>" | |
criteria = "safe-to-deploy" | ||
version = "1.0.0" | ||
|
||
[[audits.wasm-bindgen]] | ||
who = "andrea <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.84 -> 0.2.95" | ||
notes = "New features and removed code; some new unsafe blocks and they all look benign" | ||
|
||
[[audits.wasm-bindgen-backend]] | ||
who = "andrea <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.84 -> 0.2.95" | ||
notes = "New features and bug fixes; there's are new/changed unsafe blocks and they all look benign" | ||
|
||
[[audits.wasm-bindgen-macro]] | ||
who = "andrea <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.84 -> 0.2.95" | ||
notes = "Minor changes and a lot of removed code" | ||
|
||
[[audits.wasm-bindgen-macro-support]] | ||
who = "andrea <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.92 -> 0.2.95" | ||
notes = "New features and bug fixes; no new unsafe code or system calls introduced" | ||
|
||
[[audits.wasm-bindgen-shared]] | ||
who = "andrea <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.92 -> 0.2.95" | ||
notes = "Only minor changes; no new unsafe code or system calls introduced" | ||
|
||
[[trusted.reddsa]] | ||
criteria = "safe-to-deploy" | ||
user-id = 6289 # Jack Grigg (str4d) | ||
|
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
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 |
---|---|---|
|
@@ -1297,9 +1297,33 @@ delta = "0.4.1 -> 0.5.0" | |
notes = "I checked correctness of to_blocks which uses unsafe code in a safe function." | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | ||
|
||
[[audits.zcash.audits.wasm-bindgen-macro-support]] | ||
who = "Daira-Emma Hopwood <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
version = "0.2.92" | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | ||
|
||
[[audits.zcash.audits.wasm-bindgen-shared]] | ||
who = "Jack Grigg <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.83 -> 0.2.84" | ||
notes = "Bumps the schema version to add `linked_modules`." | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | ||
|
||
[[audits.zcash.audits.wasm-bindgen-shared]] | ||
who = "Jack Grigg <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.84 -> 0.2.87" | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | ||
|
||
[[audits.zcash.audits.wasm-bindgen-shared]] | ||
who = "Jack Grigg <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.87 -> 0.2.89" | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | ||
|
||
[[audits.zcash.audits.wasm-bindgen-shared]] | ||
who = "Daira-Emma Hopwood <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
delta = "0.2.89 -> 0.2.92" | ||
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" |