(link: GaloyMoney/blink#426)
domain
: primitives
- added 'Satoshis' and 'TxDenominationCurrency' primitives
- added value object for 'Satoshis'
domain
: expiration
- moved 'delay' business logic to 'invoice-expiration' domain
- moved 'getExpiration' logic to 'invoice-expiration' domain
- added 'InvoiceExpiration' type
- moved 'getExpiration' call to direct argument of new 'registerInvoice' wrapper
domain
: utils
- added 'toTypedError' and 'unsafeThrowErrAsync' wrapper functions and return type declarations
lnd
-
domain
: LightningService Created a new 'LightningService' interface with 'registerInvoice' wrapper that returns a 'safe' wrapper around the results of calling 'lightningPayReq.decode'-
created 'RegisterInvoiceArgs'
-
created a new 'RegisteredInvoice' type (result of calling 'createInvoice' + some wrapping logic)
-
created a 'LightningServiceErrorType' error type
-
domain
: LN invoice-
created new 'decodeInvoice' method to handle results of 'createInvoice' in wrapper Note: it take the
request
argument (called 'bolt11EncodedInvoice') and adds it right back to the 'paymentRequest' property of the result as a value object to be later accessed at 'lnInvoice.paymentRequest.inner' -
created new 'EncodedPaymentRequest, PaymentHash, PaymentSecret' types and error types to feed into new 'LNInvoice' type
-
-
-
service
: LightningService Created a new 'MakeLndService' to wrap the 'lnd' object and return a 'LightningService' Note: internally, the service passes the 'lnd' object to 'createInvoice' still
token
- Now converted to 'Satoshis' type via 'toSats' method
expires_at
- Now gotten from the 'invoiceExpirationForCurrency' method