src/fnpb/ln/invoice.py
def add(
        self, amount_sats: Satoshi, memo: str = "", expiry_time: Second = 86400
    ) -> pd.DataFrame:
        """Adds and returns a lightning invoice. The input parameters are filtered.

        Args:
            amount_sats: The amount in satoshis of the invoice.
            memo: The memo, i.e. description, of the invoice.
            expiry_time: How long the invoice lasts, in seconds (default is a day).
        """
        amount_msat = round(
            amount_sats * Satoshi(1e3)
        )  # convert satoshi amount to milli satoshis.
        command = f'addinvoice --amt_msat {amount_msat} --memo "{clip_memo(memo)}" --expiry {expiry_time}'
        data = self.exec_ln_command(command)
        df = pd.DataFrame(data, index=[0])
        return df
Adds and returns a lightning invoice. The input parameters are filtered.

        Args:
            amount_sats: The amount in satoshis of the invoice.
            memo: The memo, i.e. description, of the invoice.
            expiry_time: How long the invoice lasts, in seconds (default is a day).
        
Adds and returns a lightning invoice. The input parameters are filtered.
Adds and returns a lightning invoice . The input parameters are filtered .
def add(
        self, amount_sats: Satoshi, memo: str = "", expiry_time: Second = 86400
    ) -> pd.DataFrame:
        amount_msat = round(
            amount_sats * Satoshi(1e3)
        )  
        command = f'addinvoice --amt_msat {amount_msat} --memo "{clip_memo(memo)}" --expiry {expiry_time}'
        data = self.exec_ln_command(command)
        df = pd.DataFrame(data, index=[0])
        return df
def add ( self , amount_sats : Satoshi , memo : str = "" , expiry_time : Second = 86400 ) -> pd . DataFrame : amount_msat = round ( amount_sats * Satoshi ( 1e3 ) ) command = f'addinvoice --amt_msat {amount_msat} --memo "{clip_memo(memo)}" --expiry {expiry_time}' data = self . exec_ln_command ( command ) df = pd . DataFrame ( data , index = [ 0 ] ) return df
Adds and returns a lightning invoice.
Adds and returns a lightning invoice .
"""Adds and returns a lightning invoice. The input parameters are filtered.

        Args:
            amount_sats: The amount in satoshis of the invoice.
            memo: The memo, i.e. description, of the invoice.
            expiry_time: How long the invoice lasts, in seconds (default is a day).
        """ # convert satoshi amount to milli satoshis.
self
amount_sats
Satoshi
The amount in satoshis of the invoice.
The amount in satoshis of the invoice .
memo
str
The memo, i.e. description, of the invoice.
The memo i . e . description of the invoice .
expiry_time
Second
None