feat(stateless): make UncompressedPublicKey serializable (#19115)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
Ignacio Hagopian
2025-10-18 05:41:56 -03:00
committed by GitHub
parent 8d91b9e443
commit 46228d0a18
2 changed files with 19 additions and 2 deletions

View File

@@ -433,7 +433,11 @@ where
.map(|(i, tx)| {
tx.signature()
.recover_from_prehash(&tx.signature_hash())
.map(|keys| keys.to_encoded_point(false).as_bytes().try_into().unwrap())
.map(|keys| {
UncompressedPublicKey(
keys.to_encoded_point(false).as_bytes().try_into().unwrap(),
)
})
.map_err(|e| format!("failed to recover signature for tx #{i}: {e}").into())
})
.collect::<Result<Vec<UncompressedPublicKey>, _>>()