Class: StellarSpectrum::Client
- Inherits:
-
Object
- Object
- StellarSpectrum::Client
- Defined in:
- lib/stellar_spectrum/client.rb
Constant Summary collapse
- MAX_LOCK_TIME_IN_SECONDS =
120
Instance Attribute Summary collapse
-
#horizon_url ⇒ Object
Returns the value of attribute horizon_url.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
-
#seeds ⇒ Object
Returns the value of attribute seeds.
Instance Method Summary collapse
-
#initialize(redis_url: StellarSpectrum.configuration.redis_url, seeds: StellarSpectrum.configuration.seeds, horizon_url: StellarSpectrum.configuration.horizon_url) ⇒ Client
constructor
A new instance of Client.
- #send_payment(from:, to:, amount:, memo: nil, transaction_source: nil, sequence: nil) ⇒ Object
Constructor Details
#initialize(redis_url: StellarSpectrum.configuration.redis_url, seeds: StellarSpectrum.configuration.seeds, horizon_url: StellarSpectrum.configuration.horizon_url) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 18 |
# File 'lib/stellar_spectrum/client.rb', line 10 def initialize( redis_url: StellarSpectrum.configuration.redis_url, seeds: StellarSpectrum.configuration.seeds, horizon_url: StellarSpectrum.configuration.horizon_url ) self.redis_url = redis_url self.seeds = seeds self.horizon_url = horizon_url end |
Instance Attribute Details
#horizon_url ⇒ Object
Returns the value of attribute horizon_url.
6 7 8 |
# File 'lib/stellar_spectrum/client.rb', line 6 def horizon_url @horizon_url end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
4 5 6 |
# File 'lib/stellar_spectrum/client.rb', line 4 def redis_url @redis_url end |
#seeds ⇒ Object
Returns the value of attribute seeds.
5 6 7 |
# File 'lib/stellar_spectrum/client.rb', line 5 def seeds @seeds end |
Instance Method Details
#send_payment(from:, to:, amount:, memo: nil, transaction_source: nil, sequence: nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/stellar_spectrum/client.rb', line 20 def send_payment( from:, to:, amount:, memo: nil, transaction_source: nil, sequence: nil ) result = SendPayment.( from: from, to: to, amount: amount, memo: memo, seeds: seeds, redis_url: redis_url, horizon_url: horizon_url, force_transaction_source: transaction_source, force_sequence_number: sequence, force_lock: false, ) result.send_asset_response end |