pub struct Ed25519FileSigner { /* private fields */ }Expand description
Signs with an Ed25519 key loaded from a file on disk.
Two file formats are accepted:
- Raw 32-byte seed — first 32 bytes of the file, any trailing bytes ignored. Useful for ad-hoc test keys.
- Hex-encoded 32-byte seed — UTF-8 string, optionally
0x-prefixed, 64 hex characters.
Implementations§
Source§impl Ed25519FileSigner
impl Ed25519FileSigner
Sourcepub async fn load_from_file(path: impl AsRef<Path>) -> Result<Self, TaiError>
pub async fn load_from_file(path: impl AsRef<Path>) -> Result<Self, TaiError>
Load a key from a file. Accepts raw 32-byte seed OR a hex-encoded seed in UTF-8.
On Unix, warns to stderr if the file is readable by group or others
(mode bits not in 0o600). The load still proceeds — refusing
outright would be hostile to ad-hoc testing — but the warning gives
the user a chance to fix it before signing anything that costs
money.
Sourcepub fn public_key(&self) -> &VerifyingKey
pub fn public_key(&self) -> &VerifyingKey
Expose the public key (e.g., for diagnostics).
Trait Implementations§
Source§impl Signer for Ed25519FileSigner
impl Signer for Ed25519FileSigner
Source§fn address(&self) -> SuiAddress
fn address(&self) -> SuiAddress
The Sui address this signer authorizes for.
Auto Trait Implementations§
impl Freeze for Ed25519FileSigner
impl RefUnwindSafe for Ed25519FileSigner
impl Send for Ed25519FileSigner
impl Sync for Ed25519FileSigner
impl Unpin for Ed25519FileSigner
impl UnsafeUnpin for Ed25519FileSigner
impl UnwindSafe for Ed25519FileSigner
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