Skip to content

Commit a72455c

Browse files
committed
add keypair getter to Keyfile
1 parent df101ac commit a72455c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: src/keyfile.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,11 @@ impl Keyfile {
522522
self.__str__(py)
523523
}
524524

525-
// TODO (devs): rust creates the same function automatically by `keypair` getter function and the error accuses. We need to understand how to avoid this.
526525
/// Returns the keypair from path, decrypts data if the file is encrypted.
527-
// #[getter]
528-
// pub fn keypair(&self, py: Python) -> PyResult<bool>{
529-
// self.get_keypair(None, py)
530-
// }
526+
#[getter(keypair)]
527+
pub fn keypair_py(&self, py: Python) -> PyResult<Keypair>{
528+
self.get_keypair(None, py)
529+
}
531530

532531
/// Returns the keypair from the path, decrypts data if the file is encrypted.
533532
#[pyo3(signature = (password = None))]

0 commit comments

Comments
 (0)