Add ZK BBS+-based selectively disclosable credentials (JPT) #4375
Annotations
10 errors and 2 warnings
the trait bound `[u8]: std::convert::From<std::vec::Vec<u8>>` is not satisfied:
src/storage/jwk_storage_bbs_plus_ext.rs#L74
error[E0277]: the trait bound `[u8]: std::convert::From<std::vec::Vec<u8>>` is not satisfied
--> src/storage/jwk_storage_bbs_plus_ext.rs:74:8
|
74 | .try_into()
| ^^^^^^^^ the trait `std::convert::From<std::vec::Vec<u8>>` is not implemented for `[u8]`, which is required by `std::vec::Vec<u8>: std::convert::TryInto<_>`
|
= help: the following other types implement trait `std::convert::From<T>`:
<&'h [u8] as std::convert::From<regex::regex::bytes::Match<'h>>>
<&'a [u8] as std::convert::From<der::asn1::octet_string::OctetStringRef<'a>>>
<&'a [u8] as std::convert::From<der::asn1::videotex_string::VideotexStringRef<'a>>>
= note: required for `std::vec::Vec<u8>` to implement `std::convert::Into<[u8]>`
= note: required for `[u8]` to implement `std::convert::TryFrom<std::vec::Vec<u8>>`
= note: required for `std::vec::Vec<u8>` to implement `std::convert::TryInto<[u8]>`
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L73
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:73:9
|
73 | let signature = signature
| ^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L73
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:73:21
|
73 | let signature = signature
| _____________________^
74 | | .try_into()
75 | | .map_err(|_| JsError::new("Invalid signature length"))?;
| |_____________________________________________________________^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L73
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:73:21
|
73 | let signature = signature
| _____________________^
74 | | .try_into()
75 | | .map_err(|_| JsError::new("Invalid signature length"))?;
| |____________________________________________________________^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
note: required by a bound in `std::result::Result`
--> /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:502:1
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L75
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:75:8
|
75 | .map_err(|_| JsError::new("Invalid signature length"))?;
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
note: required by a bound in `std::result::Result::<T, E>::map_err`
--> /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/result.rs:826:5
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L74
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:74:8
|
74 | .try_into()
| ^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`, which is required by `std::vec::Vec<u8>: std::convert::TryInto<_>`
= note: required for `std::vec::Vec<u8>` to implement `std::convert::TryInto<[u8]>`
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L73
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:73:21
|
73 | let signature = signature
| _____________________^
74 | | .try_into()
75 | | .map_err(|_| JsError::new("Invalid signature length"))?;
| |_____________________________________________________________^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
note: required by a bound in `std::ops::ControlFlow`
--> /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/control_flow.rs:85:1
|
the size for values of type `[u8]` cannot be known at compilation time:
src/storage/jwk_storage_bbs_plus_ext.rs#L75
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> src/storage/jwk_storage_bbs_plus_ext.rs:75:61
|
75 | .map_err(|_| JsError::new("Invalid signature length"))?;
| ^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
note: required by a bound in `std::ops::ControlFlow::Break`
--> /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/control_flow.rs:93:5
|
method `update_signature` has an incompatible type for trait:
src/storage/jwk_storage_bbs_plus_ext.rs#L119
error[E0053]: method `update_signature` has an incompatible type for trait
--> src/storage/jwk_storage_bbs_plus_ext.rs:119:16
|
119 | signature: &[u8; BBSplusSignature::BYTES],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `[u8]`, found `[u8; 80]`
| help: change the parameter type to match the trait: `&'life3 [u8]`
|
= note: expected signature `fn(&'life0 storage::jwk_storage::WasmJwkStorage, &'life1 identity_iota::storage::KeyId, &'life2 identity_iota::verification::jwk::Jwk, &'life3 [u8], identity_iota::storage::ProofUpdateCtx) -> std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = std::result::Result<std::vec::Vec<u8>, identity_iota::core::SingleStructError<identity_iota::storage::KeyStorageErrorKind>>> + 'async_trait)>>`
found signature `fn(&'life0 storage::jwk_storage::WasmJwkStorage, &'life1 identity_iota::storage::KeyId, &'life2 identity_iota::verification::jwk::Jwk, &'life3 [u8; 80], identity_iota::storage::ProofUpdateCtx) -> std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = std::result::Result<[u8; 80], identity_iota::core::SingleStructError<identity_iota::storage::KeyStorageErrorKind>>> + 'async_trait)>>`
|
mismatched types:
src/storage/jwk_storage_bbs_plus_ext.rs#L134
error[E0308]: mismatched types
--> src/storage/jwk_storage_bbs_plus_ext.rs:134:5
|
134 | update_bbs_signature(alg, signature, &sk, &ctx)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<[u8; 80], ...>`, found `Result<Vec<u8>, ...>`
|
= note: expected enum `std::result::Result<[u8; 80], _>`
found enum `std::result::Result<std::vec::Vec<u8>, _>`
note: return type inferred to be `std::result::Result<[u8; 80], identity_iota::core::SingleStructError<identity_iota::storage::KeyStorageErrorKind>>` here
--> src/storage/jwk_storage_bbs_plus_ext.rs:84:1
|
84 | #[async_trait::async_trait(?Send)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the attribute macro `async_trait::async_trait` (in Nightly builds, run with -Z macro-backtrace for more info)
|
clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9, actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|