Trait near_crypto::Signer
source · [−]pub trait Signer: Sync + Send {
fn public_key(&self) -> PublicKey;
fn sign(&self, data: &[u8]) -> Signature;
fn compute_vrf_with_proof(&self, _data: &[u8]) -> (Value, Proof);
fn verify(&self, data: &[u8], signature: &Signature) -> bool { ... }
fn write_to_file(&self, _path: &Path) -> Result<()> { ... }
}
Expand description
Generic signer trait, that can sign with some subset of supported curves.
Required methods
fn public_key(&self) -> PublicKey
Provided methods
fn write_to_file(&self, _path: &Path) -> Result<()>
fn write_to_file(&self, _path: &Path) -> Result<()>
Used by test infrastructure, only implement if make sense for testing otherwise raise unimplemented
.