Skip to content

Integrate product-core branch feat/iota-v1-2-3-and-resources-for-wasm #1687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]

[workspace.dependencies]
bls12_381_plus = { version = "0.8.17" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "iota_interaction" }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "iota_interaction_ts" }
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "product_common" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "iota_interaction" }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "iota_interaction_ts" }
product_common = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "product_common" }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false }
strum = { version = "0.25", default-features = false, features = ["std", "derive"] }
Expand Down
2 changes: 1 addition & 1 deletion bindings/grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt"
identity_jose = { path = "../../identity_jose" }
identity_storage = { path = "../../identity_storage", features = ["memstore"] }
identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v0.12.0-rc" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.2.3" }
iota-sdk-legacy = { package = "iota-sdk", version = "1.1.2", features = ["stronghold"] }
prost = "0.13"
rand = "0.8.5"
Expand Down
6 changes: 3 additions & 3 deletions bindings/wasm/identity_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ identity_ecdsa_verifier = { path = "../../../identity_ecdsa_verifier", default-f
identity_eddsa_verifier = { path = "../../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
# Remove iota-sdk dependency while working on issue #1445
iota-sdk = { version = "1.1.5", default-features = false, features = ["serde", "std"] }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "iota_interaction", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "iota_interaction_ts" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "iota_interaction", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "iota_interaction_ts", features = ["into-wasm-error"] }
js-sys = { version = "0.3.61" }
json-proof-token = "0.3.4"
proc_typescript = { version = "0.1.0", path = "./proc_typescript" }
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.2.1", package = "product_common", features = ["core-client", "transaction", "bindings"] }
product_common = { git = "https://github.com/iotaledger/product-core.git", branch = "feat/iota-v1-2-3-and-resources-for-wasm", package = "product_common", features = ["core-client", "transaction", "bindings"] }
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", default-features = false, tag = "v0.3.0" }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.6.5"
Expand Down
8 changes: 4 additions & 4 deletions bindings/wasm/identity_wasm/package-lock.json

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

2 changes: 1 addition & 1 deletion bindings/wasm/identity_wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"wasm-opt": "^1.4.0"
},
"dependencies": {
"@iota/iota-interaction-ts": "^0.5.1",
"@iota/iota-interaction-ts": "^0.6.1",
"@noble/ed25519": "^1.7.3",
"@noble/hashes": "^1.4.0",
"@types/node-fetch": "^2.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ use identity_iota::document::CoreDocument;
use identity_iota::prelude::IotaDocument;
use js_sys::Array;

use product_common::bindings::wasm_error::Result;

use crate::did::ArrayIToCoreDocument;
use crate::did::CoreDocumentLock;
use crate::did::IToCoreDocument;
use crate::did::WasmCoreDocument;
use crate::error::Result;
use crate::iota::IotaDocumentLock;
use crate::iota::WasmIotaDocument;

Expand Down
5 changes: 3 additions & 2 deletions bindings/wasm/identity_wasm/src/common/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ use identity_iota::core::Duration;
use identity_iota::core::Timestamp;
use wasm_bindgen::prelude::*;

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_json;

#[wasm_bindgen]
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion bindings/wasm/identity_wasm/src/common/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use identity_iota::core::Object;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;

use crate::error::WasmResult;
use product_common::bindings::wasm_error::WasmResult;

#[wasm_bindgen]
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions bindings/wasm/identity_wasm/src/common/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use wasm_bindgen::JsCast;
use wasm_bindgen::JsValue;

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;

/// Special-case for deserializing [`js_sys::Map`], which otherwise serializes to JSON as an empty
/// object `{}`. This uses a [`js_sys::Object`] as an intermediate representation to convert
Expand Down
6 changes: 4 additions & 2 deletions bindings/wasm/identity_wasm/src/credential/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ use crate::credential::ArraySubject;
use crate::credential::ICredential;
use crate::credential::UrlOrIssuer;
use crate::credential::WasmProof;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

/// Represents a set of claims describing an entity.
#[wasm_bindgen(js_name = Credential, inspectable)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use wasm_bindgen::prelude::*;

use proc_typescript::typescript;

use crate::error::WasmResult;
use product_common::bindings::wasm_error::WasmResult;

impl TryFrom<ICredential> for CredentialBuilder {
type Error = JsValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
use crate::credential::ArrayCoreDID;
use crate::credential::WasmJwt;
use crate::did::WasmCoreDID;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

use identity_iota::credential::DomainLinkageConfiguration;
use identity_iota::credential::Jwt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::WasmResult;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::core::Timestamp;
use identity_iota::core::Url;
use identity_iota::credential::DomainLinkageCredentialBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::common::ImportedDocumentLock;
use crate::credential::WasmDomainLinkageConfiguration;
use crate::credential::WasmJwtCredentialValidationOptions;
use crate::did::IToCoreDocument;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use crate::verification::IJwsVerifier;
use crate::verification::WasmJwsVerifier;
use identity_iota::core::Url;
Expand Down
1 change: 1 addition & 0 deletions bindings/wasm/identity_wasm/src/credential/jpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use identity_iota::credential::Jpt;
use wasm_bindgen::prelude::*;
use product_common::impl_wasm_clone;

/// A JSON Proof Token (JPT).
#[wasm_bindgen(js_name = Jpt)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
use identity_iota::core::Object;
use identity_iota::credential::DecodedJptCredential;
use wasm_bindgen::prelude::*;
use product_common::impl_wasm_clone;
use product_common::bindings::wasm_error::Result;

use crate::common::MapStringAny;
use crate::credential::WasmCredential;
use crate::error::Result;
use crate::jpt::WasmJwpIssued;

#[wasm_bindgen(js_name = DecodedJptCredential)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
use identity_iota::credential::JptCredentialValidationOptions;
use wasm_bindgen::prelude::*;

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

/// Options to declare validation criteria for {@link Jpt}.
#[derive(Debug, Default, Clone)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::credential::WasmFailFast;
use crate::credential::WasmJpt;
use crate::credential::WasmJptCredentialValidationOptions;
use crate::did::IToCoreDocument;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::credential::JptCredentialValidator;
use wasm_bindgen::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::credential::WasmCredential;
use crate::credential::WasmJpt;
use crate::did::IToCoreDocument;
use crate::did::WasmCoreDID;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::core::Object;
use identity_iota::credential::JptCredentialValidatorUtils;
use identity_iota::did::CoreDID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2020-2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::credential::JwpCredentialOptions;
use serde::Deserialize;
use serde::Serialize;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright 2020-2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;
use identity_iota::document::verifiable::JwpVerificationOptions;
use wasm_bindgen::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use wasm_bindgen::prelude::*;

use crate::common::MapStringAny;
use crate::credential::WasmCredential;
use crate::error::Result;
use product_common::bindings::wasm_error::Result;
use product_common::impl_wasm_clone;

#[wasm_bindgen(js_name = DecodedJptPresentation)]
pub struct WasmDecodedJptPresentation(pub(crate) DecodedJptPresentation<Object>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
use identity_iota::credential::JptPresentationValidationOptions;
use wasm_bindgen::prelude::*;

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

/// Options to declare validation criteria for a {@link Jpt} presentation.
#[derive(Debug, Default, Clone)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::credential::WasmFailFast;
use crate::credential::WasmJpt;
use crate::credential::WasmJptPresentationValidationOptions;
use crate::did::IToCoreDocument;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::credential::JptPresentationValidator;
use wasm_bindgen::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::credential::options::WasmStatusCheck;
use crate::credential::WasmCredential;
use crate::credential::WasmJpt;
use crate::did::WasmCoreDID;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use identity_iota::credential::JptPresentationValidatorUtils;
use wasm_bindgen::prelude::*;

Expand Down
2 changes: 2 additions & 0 deletions bindings/wasm/identity_wasm/src/credential/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

use identity_iota::credential::Jwt;
use wasm_bindgen::prelude::*;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

/// A wrapper around a JSON Web Token (JWK).
#[wasm_bindgen(js_name = Jwt)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use crate::did::ArrayIToCoreDocument;
use crate::did::IToCoreDocument;
use crate::did::WasmCoreDID;
use crate::did::WasmJwsVerificationOptions;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use crate::verification::IJwsVerifier;
use crate::verification::WasmJwsVerifier;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;
use identity_iota::credential::KeyBindingJWTValidationOptions;
use wasm_bindgen::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;
use wasm_bindgen::prelude::*;

use identity_iota::credential::JwtCredentialValidationOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::credential::WasmFailFast;
use crate::did::ArrayIToCoreDocument;
use crate::did::IToCoreDocument;
use crate::did::WasmJwsVerificationOptions;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use crate::sd_jwt::WasmKeyBindingJwtClaims;
use crate::sd_jwt::WasmSdJwt;
use crate::verification::IJwsVerifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use identity_iota::core::Object;
use identity_iota::credential::Credential;
use identity_iota::credential::Jwt;
use wasm_bindgen::prelude::*;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;

use crate::common::RecordStringAny;
use crate::credential::WasmCredential;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::credential::WasmJwt;
use crate::credential::WasmPresentation;
use crate::did::IToCoreDocument;
use crate::did::WasmCoreDID;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use crate::verification::IJwsVerifier;
use crate::verification::WasmJwsVerifier;
use identity_iota::credential::JwtPresentationValidator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use product_common::impl_wasm_json;
use identity_iota::credential::JwtPresentationValidationOptions;
use wasm_bindgen::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

use crate::common::ArrayString;
use crate::did::WasmService;
use crate::error::Result;
use crate::error::WasmResult;
use product_common::bindings::wasm_error::Result;
use product_common::bindings::wasm_error::WasmResult;
use product_common::impl_wasm_clone;
use identity_iota::core::Object;
use identity_iota::core::OrderedSet;
use identity_iota::core::Url;
Expand Down
Loading
Loading