Function FlashControlAPI.createNewInvoice
Create an invoice that can be paid by another party. A preimage is shared through a secure channel to the party which will pay the invoice. The hash of the preimage is used in the contract, which is then shared across zero or more channel hops. The invoice payer must reveal their preimage to prove.
Parameters
Name | Description |
---|---|
reg_pk | the registered public key. If this key is not managed by this Flash node then an error will be returned. |
destination | the public key of the destination |
amount | the amount to invoice |
expiry | expiry time of this invoice |
description | optional description |
Returns
the invoice, or an error if this public key is not recognized