v0.2.0 (2018-07-29)
- Added: Interface 
pay.StorageClient- an abstraction for multiple storage clients, which allows you to write your own storage client for storing the preimages that have already been used as payment proof in a request (issue #1)- Methods 
WasUsed(string) (bool, error)andSetUsed(string) error 
 - Methods 
 - Added: Struct 
pay.RedisClient- implements theStorageClientinterface (issue #1)- Factory function 
NewRedisClient(...) 
 - Factory function 
 - Added: Var 
pay.DefaultRedisOptions- aRedisOptionsobject with default values - Added: Struct 
pay.GoMap- implements theStorageClientinterface (issue #1)- Factory function 
NewGoMap() 
 - Factory function 
 - Improved: Increased middleware performance and decreased load on the connected lnd when invalid requests with the 
x-preimageheader are received (invalid because the preimage was already used) - Instead of first getting a corresponding invoice for a preimage from the lnd and then checking if the preimage was used already, the order of these operations was switched, because then, if the preimage was already used, no request to lnd needs to be made anymore. - Improved: All fields of the struct 
pay.RedisOptionsare now optional 
Breaking changes
Package pay:
- Changed: 
pay.NewHandlerFuncMiddleware(...),pay.NewHandlerMiddleware(...)andpay.NewGinMiddleware(...)now take aln.StorageClientinstead of a*redis.Clientas parameter (issue #1) 
Package ln (none of these changes should affect anyone, because this package is meant to be used only internally):
- Changed: 
ln.CheckPreimage(...)was renamed toln.CheckInvoice(...)and doesn't check the storage anymore. Thelnmethods are supposed to just handle lightning related things and nothing else. - Removed: Package 
lnrpc- Instead of using our own generated lnd gRPC Go file, import the one from Lightning Labs.