pub struct Wallet {
pub secp256k1_secret_key: Option<String>,
pub secp256k1_public_key: Option<String>,
pub secp256k1_public_address: Option<String>,
pub secp256k1_mnemonic: Option<String>,
pub secp256r1_secret_key: Option<String>,
pub secp256r1_public_key: Option<String>,
pub ed25519_secret_key: Option<String>,
pub ed25519_public_key: Option<String>,
}Fields§
§secp256k1_secret_key: Option<String>§secp256k1_public_key: Option<String>§secp256k1_public_address: Option<String>§secp256k1_mnemonic: Option<String>§secp256r1_secret_key: Option<String>§secp256r1_public_key: Option<String>§ed25519_secret_key: Option<String>§ed25519_public_key: Option<String>Implementations§
source§impl Wallet
impl Wallet
pub fn generate_keccak256_from(pubk: String) -> String
pub fn new_ed25519() -> Self
pub fn new_secp256k1(passphrase: &str) -> Self
pub fn new_secp256r1() -> Self
pub fn ed25519_sign(data: String, prvkey: &str) -> Option<String>
pub fn verify_ed25519_signature( sig: String, data: String, pubkey: String ) -> Result<(), Unspecified>
pub fn retrieve_ed25519_keypair(prv_key: &str) -> Ed25519KeyPair
pub fn generate_secp256k1_pubkey_from(pk: String) -> Result<PublicKey, Error>
pub fn verify_secp256k1_signature( data: String, sig: Signature, pk: PublicKey ) -> Result<(), Error>
pub fn retrieve_secp256k1_keypair(secret_key: &str) -> (PublicKey, SecretKey)
pub fn secp256k1_sign(signer: String, data: String) -> Signature
pub fn retrieve_secp256r1_keypair(pubkey: &str, prvkey: &str) -> KeyPair
pub fn secp256r1_sign(signer: String, data: String) -> Option<String>
pub fn verify_secp256r1_signature( signature: &str, pubkey: &str ) -> Result<Vec<u8>, Error>
pub fn generate_sha256_from(data: String) -> [u8; 32]
Trait Implementations§
source§impl<'de> Deserialize<'de> for Wallet
impl<'de> Deserialize<'de> for Wallet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Wallet
impl Send for Wallet
impl Sync for Wallet
impl Unpin for Wallet
impl UnwindSafe for Wallet
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