Class: Chain::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/chain/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



17
18
19
# File 'lib/chain/client.rb', line 17

def initialize(opts = {})
  @opts = {url: DEFAULT_API_HOST}.merge(opts)
end

Instance Method Details

#access_tokensAccessToken::ClientModule



31
32
33
# File 'lib/chain/client.rb', line 31

def access_tokens
  @access_tokens ||= AccessToken::ClientModule.new(self)
end

#accountsAccount::ClientModule



41
42
43
# File 'lib/chain/client.rb', line 41

def accounts
  @accounts ||= Account::ClientModule.new(self)
end

#assetsAsset::ClientModule

Returns:



46
47
48
# File 'lib/chain/client.rb', line 46

def assets
  @assets ||= Asset::ClientModule.new(self)
end

#authorization_grantsAuthorizationGrant::ClientModule



36
37
38
# File 'lib/chain/client.rb', line 36

def authorization_grants
  @authorization_grants ||= AuthorizationGrant::ClientModule.new(self)
end

#balancesBalance::ClientModule



51
52
53
# File 'lib/chain/client.rb', line 51

def balances
  @balances ||= Balance::ClientModule.new(self)
end

#configConfig::ClientModule



56
57
58
# File 'lib/chain/client.rb', line 56

def config
  @config ||= Config::ClientModule.new(self)
end

#connConnection

Returns:



26
27
28
# File 'lib/chain/client.rb', line 26

def conn
  @conn ||= Connection.new(@opts)
end

#mock_hsmMockHSM::ClientModule



61
62
63
# File 'lib/chain/client.rb', line 61

def mock_hsm
  @mock_hsm ||= MockHSM::ClientModule.new(self)
end

#optsObject



21
22
23
# File 'lib/chain/client.rb', line 21

def opts
  @opts.dup
end

#transaction_feedsTransactionFeed::ClientModule



71
72
73
# File 'lib/chain/client.rb', line 71

def transaction_feeds
  @transaction_feeds ||= TransactionFeed::ClientModule.new(self)
end

#transactionsTransaction::ClientModule



66
67
68
# File 'lib/chain/client.rb', line 66

def transactions
  @transactions ||= Transaction::ClientModule.new(self)
end

#unspent_outputsUnspentOutput::ClientModule



76
77
78
# File 'lib/chain/client.rb', line 76

def unspent_outputs
  @unspent_outputs ||= UnspentOutput::ClientModule.new(self)
end