- /// Sign an invoice.
- /// By parameterizing by the raw invoice bytes instead of the hash, we allow implementors of
- /// this trait to parse the invoice and make sure they're signing what they expect, rather than
- /// blindly signing the hash.
- /// The `hrp` is ASCII bytes, while the invoice data is base32-encoded.
- ///
- /// The secret key used to sign the invoice is dependent on the [`Recipient`].
- ///
- /// Errors if the [`Recipient`] variant is not supported by the implementation.
- fn sign_invoice(&self, hrp_bytes: &[u8], invoice_data: &[u5], receipient: Recipient) -> Result<RecoverableSignature, ()>;
- /// Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
- ///
- /// If the implementor of this trait supports [phantom node payments], then every node that is
- /// intended to be included in the phantom invoice route hints must return the same value from
- /// this method.
- // This is because LDK avoids storing inbound payment data by encrypting payment data in the
- // payment hash and/or payment secret, therefore for a payment to be receivable by multiple
- // nodes, they must share the key that encrypts this payment data.