This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
Return non-wrapped types from Invoice
getters if possible
#26
Labels
Invoice
getters if possible
#26
The
Invoice
type has the highest level of abstraction inrust-lightning-invoice
and aims to provide an ergonomic API. @stetvenroose pointed out in #23 that the internal newtypes are rather inconvenient and I agree, but unfortunately we can't get rid of them.I'd propose to at least make the
Invoice
interface as conevnient as possible by making the getters return the inner type of the respective newtype:payment_hash
should returnbitcoin_hashes::sha256::Hash
instead ofSha256
payee_pub_key
andrecover_payee_pub_key
should returnsecp256k1::...::PublicKey
instead ofPayeePubKey
expiry_time
should returnstd::time::Duration
instead ofExpiryTime
min_final_cltv_expiry
should returnu64
instead ofMinFinalCltvExpiry
@TheBlueMatt and @stevenroose do you think that's an improvement?
The text was updated successfully, but these errors were encountered: