pub struct JsHydraSigner { /* private fields */ }
Expand description
Thin adapter around {@link SecpPrivateKey} for signing Hydra transactions.
Implementations§
Source§impl JsHydraSigner
impl JsHydraSigner
Sourcepub fn new(inner: JsSecpPrivateKey) -> JsHydraSigner
pub fn new(inner: JsSecpPrivateKey) -> JsHydraSigner
Creates a {@link HydraSigner} from a {@link SecpPrivateKey}.
Sourcepub fn sign_hydra_transaction(
&self,
transaction: &JsValue,
) -> Result<JsValue, JsValue>
pub fn sign_hydra_transaction( &self, transaction: &JsValue, ) -> Result<JsValue, JsValue>
Signs the Hydra transaction.
Fills in signature and id fields, so those can be missing in the unsigned input, but the public key needs to be already properly set to the one matching the signer private key.
Trait Implementations§
Source§impl From<JsHydraSigner> for JsValue
impl From<JsHydraSigner> for JsValue
Source§fn from(value: JsHydraSigner) -> Self
fn from(value: JsHydraSigner) -> Self
Converts to this type from the input type.
Source§impl From<SecpPrivateKey> for JsHydraSigner
impl From<SecpPrivateKey> for JsHydraSigner
Source§fn from(inner: SecpPrivateKey) -> Self
fn from(inner: SecpPrivateKey) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsHydraSigner
impl FromWasmAbi for JsHydraSigner
Source§impl IntoWasmAbi for JsHydraSigner
impl IntoWasmAbi for JsHydraSigner
Source§impl LongRefFromWasmAbi for JsHydraSigner
impl LongRefFromWasmAbi for JsHydraSigner
Source§impl OptionFromWasmAbi for JsHydraSigner
impl OptionFromWasmAbi for JsHydraSigner
Source§impl OptionIntoWasmAbi for JsHydraSigner
impl OptionIntoWasmAbi for JsHydraSigner
Source§impl RefFromWasmAbi for JsHydraSigner
impl RefFromWasmAbi for JsHydraSigner
Source§type Anchor = RcRef<JsHydraSigner>
type Anchor = RcRef<JsHydraSigner>
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 JsHydraSigner
impl RefMutFromWasmAbi for JsHydraSigner
Source§impl TryFromJsValue for JsHydraSigner
impl TryFromJsValue for JsHydraSigner
Source§impl VectorFromWasmAbi for JsHydraSigner
impl VectorFromWasmAbi for JsHydraSigner
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsHydraSigner]>
Source§impl VectorIntoJsValue for JsHydraSigner
impl VectorIntoJsValue for JsHydraSigner
fn vector_into_jsvalue(vector: Box<[JsHydraSigner]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsHydraSigner
impl VectorIntoWasmAbi for JsHydraSigner
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsHydraSigner]>) -> Self::Abi
Source§impl WasmDescribeVector for JsHydraSigner
impl WasmDescribeVector for JsHydraSigner
Source§impl Wraps<SecpPrivateKey> for JsHydraSigner
impl Wraps<SecpPrivateKey> for JsHydraSigner
Source§fn inner(&self) -> &SecpPrivateKey
fn inner(&self) -> &SecpPrivateKey
Converts a reference to a WASM type to a reference to the underlying Rust type.
impl SupportsConstructor for JsHydraSigner
impl SupportsInstanceProperty for JsHydraSigner
impl SupportsStaticProperty for JsHydraSigner
Auto Trait Implementations§
impl Freeze for JsHydraSigner
impl RefUnwindSafe for JsHydraSigner
impl Send for JsHydraSigner
impl Sync for JsHydraSigner
impl Unpin for JsHydraSigner
impl UnwindSafe for JsHydraSigner
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::Abi
Source§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
.