Compare commits

...

2 Commits

Author SHA1 Message Date
bumi a891ab0236 Bump version 2020-11-20 23:49:44 +01:00
bumi 2f7ae9202f Support credentials as hex value 2020-11-20 23:49:44 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,8 @@ module Lnrpc
self.address = options[:address] || DEFAULT_ADDRESS
if options.has_key?(:credentials)
self.credentials = options[:credentials]
# if there are non hex values prvided we assume it's the certificate file as string otherwise we assume it's the hex value
self.credentials = options[:credentials].match?(/\H/) ? options[:credentials] : [options[:credentials]].pack('H*')
elsif File.exists?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
self.credentials = ::File.read(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
else

View File

@ -1,3 +1,3 @@
module Lnrpc
VERSION = "0.11.0"
VERSION = "0.11.1"
end