FileBasedKeystore

Struct FileBasedKeystore 

Source
pub struct FileBasedKeystore { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Default for FileBasedKeystore

Source§

fn default() -> FileBasedKeystore

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FileBasedKeystore

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<FileBasedKeystore> for Keystore

Source§

fn from(v: FileBasedKeystore) -> Keystore

Converts to this type from the input type.
Source§

impl ReadOnlyAccountKeystore for FileBasedKeystore

Source§

fn aliases(&self) -> Vec<&Alias>

Return an array of Alias, consisting of every alias and its corresponding public key.

Source§

fn get_address_by_alias(&self, alias: String) -> Result<&SuiAddress, Error>

Get the address by its alias

Source§

fn get_alias_by_address(&self, address: &SuiAddress) -> Result<String, Error>

Get the alias if it exists, or return an error if it does not exist.

Source§

fn sign_hashed( &self, address: &SuiAddress, msg: &[u8], ) -> Result<Signature, Error>

Source§

fn sign_secure<T>( &self, address: &SuiAddress, msg: &T, intent: Intent, ) -> Result<Signature, Error>
where T: Serialize,

Source§

fn addresses_with_alias(&self) -> Vec<(&SuiAddress, &Alias)>

Source§

fn keys(&self) -> Vec<PublicKey>

Source§

fn get_key(&self, address: &SuiAddress) -> Result<&SuiKeyPair, Error>

Source§

fn addresses(&self) -> Vec<SuiAddress>

Source§

fn alias_names(&self) -> Vec<&str>

Source§

fn alias_exists(&self, alias: &str) -> bool

Check if an alias exists by its name
Source§

impl Serialize for FileBasedKeystore

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryInto<FileBasedKeystore> for Keystore

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<FileBasedKeystore, <Self as TryInto<FileBasedKeystore>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'de, T> FromBcs for T
where T: Deserialize<'de>,

Source§

fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>
where Self: Deserialize<'de>,

Source§

fn from_bcs_base64(base64: &str) -> Result<Self, Error>
where Self: DeserializeOwned,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToBcs for T
where T: Serialize,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,