Trait parity_rpc::v1::SecretStore
source · [−]pub trait SecretStore: Sized + Send + Sync + 'static {
fn generate_document_key(
&self,
_: H160,
_: Password,
_: H512
) -> Result<EncryptedDocumentKey>;
fn encrypt(&self, _: H160, _: Password, _: Bytes, _: Bytes) -> Result<Bytes>;
fn decrypt(&self, _: H160, _: Password, _: Bytes, _: Bytes) -> Result<Bytes>;
fn shadow_decrypt(
&self,
_: H160,
_: Password,
_: H512,
_: H512,
_: Vec<Bytes>,
_: Bytes
) -> Result<Bytes>;
fn servers_set_hash(&self, _: BTreeSet<H512>) -> Result<H256>;
fn sign_raw_hash(&self, _: H160, _: Password, _: H256) -> Result<Bytes>;
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Expand description
Parity-specific rpc interface.
Required methods
Generate document key to store in secret store.
Arguments: account
, password
, server_key_public
.
Encrypt data with key, received from secret store.
Arguments: account
, password
, key
, data
.
Decrypt data with key, received from secret store.
Arguments: account
, password
, key
, data
.
Decrypt data with shadow key, received from secret store.
Arguments: account
, password
, decrypted_secret
, common_point
, decrypt_shadows
, data
.
Calculates the hash (keccak256) of servers set for using in ServersSetChange session.
Returned hash must be signed later by using secretstore_signRawHash
method.
Arguments: servers_set
.
Provided methods
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.