Enum substrate_stellar_sdk::PublicKey[][src]

pub enum PublicKey {
    PublicKeyTypeEd25519(Uint256),
}
Expand description

Autogenerated definition for type PublicKey

Variants

PublicKeyTypeEd25519(Uint256)

Implementations

The public key of an Ed25519 signing key pair

This type is also used for Stellar account ids.

let public = "GBIVKYSF6RP4U57KPZ524X47NGTQYYPZAZ4UX5ZFYAYBJWRFXHKHDQVL";
let public_key = substrate_stellar_sdk::types::PublicKey::from_encoding(public);
assert!(public_key.is_ok());
let public_key = public_key.unwrap();
assert_eq!(&public_key.to_encoding().as_slice(), &public.as_bytes());

Return the raw binary key as a reference

Turn into the raw binary key

Return the key encoding as an ASCII string (given as Vec<u8>)

Verify the signature of a message.

Given the raw binary message, check whether the raw binary signature is valid.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Encode the XDR to a write stream Read more

Decode the XDR from a read stream Read more

Encode this type as XDR Read more

Decode XDR provided as a reference to a byte vector Read more

Encode this type as base64 encoded XDR Read more

Decode this type from base64 encoded XDR Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.