Struct solana_sdk::signer::keypair::Keypair [−][src]
pub struct Keypair(_);
Expand description
A vanilla Ed25519 key pair
Implementations
impl Keypair
[src]
impl Keypair
[src]pub fn generate<R>(csprng: &mut R) -> Self where
R: CryptoRng + RngCore,
[src]
pub fn generate<R>(csprng: &mut R) -> Self where
R: CryptoRng + RngCore,
[src]Constructs a new, random Keypair
using a caller-proveded RNG
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SignatureError>
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SignatureError>
[src]Recovers a Keypair
from a byte array
pub fn from_base58_string(s: &str) -> Self
[src]
pub fn from_base58_string(s: &str) -> Self
[src]Recovers a Keypair
from a base58-encoded string
pub fn to_base58_string(&self) -> String
[src]
pub fn to_base58_string(&self) -> String
[src]Returns this Keypair
as a base58-encoded string
Trait Implementations
impl Signer for Keypair
[src]
impl Signer for Keypair
[src]fn pubkey(&self) -> Pubkey
[src]
fn pubkey(&self) -> Pubkey
[src]Infallibly gets the implementor’s public key. Returns the all-zeros
Pubkey
if the implementor has none. Read more
fn try_pubkey(&self) -> Result<Pubkey, SignerError>
[src]
fn try_pubkey(&self) -> Result<Pubkey, SignerError>
[src]Fallibly gets the implementor’s public key
fn sign_message(&self, message: &[u8]) -> Signature
[src]
fn sign_message(&self, message: &[u8]) -> Signature
[src]Infallibly produces an Ed25519 signature over the provided message
bytes. Returns the all-zeros Signature
if signing is not possible. Read more
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
[src]
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>
[src]Fallibly produces an Ed25519 signature over the provided message
bytes.
Auto Trait Implementations
impl RefUnwindSafe for Keypair
impl Send for Keypair
impl Sync for Keypair
impl Unpin for Keypair
impl UnwindSafe for Keypair
Blanket Implementations
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,