Module: BlockstreamSatellite
- Defined in:
- lib/blockstream_satellite.rb,
lib/blockstream_satellite/order.rb,
lib/blockstream_satellite/client.rb,
lib/blockstream_satellite/version.rb,
lib/blockstream_satellite/response.rb
Defined Under Namespace
Classes: Client, Error, Order, Response
Constant Summary
collapse
- API_HOST =
'https://api.blockstream.space'
- VERSION =
"0.2.1"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.client ⇒ Object
36
37
38
|
# File 'lib/blockstream_satellite.rb', line 36
def self.client
@client ||= Client.new(lnd_client: self.lnd_client, http_client: self.http_client)
end
|
.http_client ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'lib/blockstream_satellite.rb', line 26
def self.http_client
@http_client ||= Faraday.new(url: API_HOST) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.response :json, :content_type => /\bjson$/
faraday.adapter Faraday.default_adapter
end
end
|
.info ⇒ Object
40
41
42
|
# File 'lib/blockstream_satellite.rb', line 40
def self.info
self.client.get('/info')
end
|
.lnd_client ⇒ Object
18
19
20
|
# File 'lib/blockstream_satellite.rb', line 18
def self.lnd_client
@lnd_client ||= Lnrpc::Client.new({})
end
|
.lnd_client=(value) ⇒ Object
14
15
16
|
# File 'lib/blockstream_satellite.rb', line 14
def self.lnd_client=(value)
@lnd_client = value
end
|
Instance Method Details
#http_client=(value) ⇒ Object
22
23
24
|
# File 'lib/blockstream_satellite.rb', line 22
def http_client=(value)
@http_client = value
end
|