Trait parity_rpc::v1::ParitySigning
source · [−]pub trait ParitySigning: Sized + Send + Sync + 'static {
type Metadata: Metadata;
fn compose_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<TransactionRequest>;
fn post_sign(
&self,
_: Self::Metadata,
_: H160,
_: Bytes
) -> BoxFuture<Either<U256, ConfirmationResponse>>;
fn post_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<Either<U256, ConfirmationResponse>>;
fn check_request(&self, _: U256) -> Result<Option<ConfirmationResponse>>;
fn decrypt_message(
&self,
_: Self::Metadata,
_: H160,
_: Bytes
) -> BoxFuture<Bytes>;
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... }
}Expand description
Signing methods implementation.
Associated Types
Required methods
fn compose_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<TransactionRequest>
fn compose_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<TransactionRequest>
Given partial transaction request produces transaction with all fields filled in. Such transaction can be then signed externally.
Posts sign request asynchronously. Will return a confirmation ID for later use with check_transaction.
fn post_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<Either<U256, ConfirmationResponse>>
fn post_transaction(
&self,
_: Self::Metadata,
_: TransactionRequest
) -> BoxFuture<Either<U256, ConfirmationResponse>>
Posts transaction asynchronously. Will return a transaction ID for later use with check_transaction.
fn check_request(&self, _: U256) -> Result<Option<ConfirmationResponse>>
fn check_request(&self, _: U256) -> Result<Option<ConfirmationResponse>>
Checks the progress of a previously posted request (transaction/sign). Should be given a valid send_transaction ID.
Provided methods
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
Create an IoDelegate, wiring rpc calls to the trait methods.