pub struct CompositeSignature { /* private fields */ }Expand description
A composite signature — multiple algorithm components over the same
message. Construct via CompositeSignature::from_json (the canonical
wire format) and verify with CompositeSignature::verify.
Implementations§
Source§impl CompositeSignature
impl CompositeSignature
Sourcepub fn from_json(json: &str) -> Result<CompositeSignature, JsValue>
pub fn from_json(json: &str) -> Result<CompositeSignature, JsValue>
Parse a composite signature from its canonical JSON wire format.
{ "components": [
{ "algorithm": "Ed25519",
"public_key": "<base64>",
"signature": "<base64>" },
...
] }Sourcepub fn component_count(&self) -> usize
pub fn component_count(&self) -> usize
Number of components.
Sourcepub fn algorithms(&self) -> Vec<String>
pub fn algorithms(&self) -> Vec<String>
Algorithm identifiers in component order.
Sourcepub fn verify(
&self,
message: &[u8],
) -> Result<CompositeVerificationResult, JsValue>
pub fn verify( &self, message: &[u8], ) -> Result<CompositeVerificationResult, JsValue>
Verify all components against message. Returns a
CompositeVerificationResult describing per-component outcomes.
Built-in verifiers: Ed25519 + ECDSA-P256. Unknown algorithms are reported as failed components. JS callers needing ML-DSA-65 or SLH-DSA verification must preprocess the composite and supply their own verifier callback (Phase 2D).
Trait Implementations§
Source§impl From<CompositeSignature> for JsValue
impl From<CompositeSignature> for JsValue
Source§fn from(value: CompositeSignature) -> Self
fn from(value: CompositeSignature) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for CompositeSignature
impl FromWasmAbi for CompositeSignature
Source§impl IntoWasmAbi for CompositeSignature
impl IntoWasmAbi for CompositeSignature
Source§impl LongRefFromWasmAbi for CompositeSignature
impl LongRefFromWasmAbi for CompositeSignature
Source§type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<CompositeSignature>
type Anchor = RcRef<CompositeSignature>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for CompositeSignature
impl RefFromWasmAbi for CompositeSignature
Source§type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<CompositeSignature>
type Anchor = RcRef<CompositeSignature>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for CompositeSignature
impl RefMutFromWasmAbi for CompositeSignature
Source§type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
type Abi = WasmPtr<WasmRefCell<CompositeSignature>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<CompositeSignature>
type Anchor = RcRefMut<CompositeSignature>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for CompositeSignature
impl SupportsInstanceProperty for CompositeSignature
impl SupportsStaticProperty for CompositeSignature
Source§impl TryFromJsValue for CompositeSignature
impl TryFromJsValue for CompositeSignature
Source§impl VectorFromWasmAbi for CompositeSignature
impl VectorFromWasmAbi for CompositeSignature
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CompositeSignature]>
Source§impl VectorIntoWasmAbi for CompositeSignature
impl VectorIntoWasmAbi for CompositeSignature
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CompositeSignature]>) -> Self::Abi
Source§impl WasmDescribeVector for CompositeSignature
impl WasmDescribeVector for CompositeSignature
Auto Trait Implementations§
impl Freeze for CompositeSignature
impl RefUnwindSafe for CompositeSignature
impl Send for CompositeSignature
impl Sync for CompositeSignature
impl Unpin for CompositeSignature
impl UnsafeUnpin for CompositeSignature
impl UnwindSafe for CompositeSignature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.