class SkyApi::DefaultApi
Attributes
Public Class Methods
# File lib/sky_api/api/default_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Returns the total number of unique address that have coins. @param [Hash] opts the optional parameters @return [InlineResponse200]
# File lib/sky_api/api/default_api.rb, line 25 def address_count(opts = {}) data, _status_code, _headers = address_count_with_http_info(opts) data end
Returns the total number of unique address that have coins. @param [Hash] opts the optional parameters @return [Array<(InlineResponse200
, Integer, Hash)>] InlineResponse200
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 33 def address_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.address_count ...' end # resource path local_var_path = '/api/v1/addresscount' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse200' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#address_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the historical, spent outputs associated with an address @param address [String] address to filter by @param [Hash] opts the optional parameters @return [Array<Object>]
# File lib/sky_api/api/default_api.rb, line 80 def address_uxouts(address, opts = {}) data, _status_code, _headers = address_uxouts_with_http_info(address, opts) data end
Returns the historical, spent outputs associated with an address @param address [String] address to filter by @param [Hash] opts the optional parameters @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 89 def address_uxouts_with_http_info(address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.address_uxouts ...' end # verify the required parameter 'address' is set if @api_client.config.client_side_validation && address.nil? fail ArgumentError, "Missing the required parameter 'address' when calling DefaultApi.address_uxouts" end # resource path local_var_path = '/api/v1/address_uxouts' # query parameters query_params = opts[:query_params] || {} query_params[:'address'] = address # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<Object>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#address_uxouts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @return [String]
# File lib/sky_api/api/default_api.rb, line 139 def api_v1_rawtx_get(opts = {}) data, _status_code, _headers = api_v1_rawtx_get_with_http_info(opts) data end
@param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 146 def api_v1_rawtx_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.api_v1_rawtx_get ...' end # resource path local_var_path = '/api/v1/rawtx' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#api_v1_rawtx_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @return [String]
# File lib/sky_api/api/default_api.rb, line 191 def api_v2_metrics_get(opts = {}) data, _status_code, _headers = api_v2_metrics_get_with_http_info(opts) data end
@param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 198 def api_v2_metrics_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.api_v2_metrics_get ...' end # resource path local_var_path = '/api/v2/metrics' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#api_v2_metrics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param addrs [String] command separated list of addresses @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 245 def balance_get(addrs, opts = {}) data, _status_code, _headers = balance_get_with_http_info(addrs, opts) data end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param addrs [String] command separated list of addresses @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 254 def balance_get_with_http_info(addrs, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.balance_get ...' end # verify the required parameter 'addrs' is set if @api_client.config.client_side_validation && addrs.nil? fail ArgumentError, "Missing the required parameter 'addrs' when calling DefaultApi.balance_get" end # resource path local_var_path = '/api/v1/balance' # query parameters query_params = opts[:query_params] || {} query_params[:'addrs'] = addrs # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#balance_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param addrs [String] command separated list of addresses @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 306 def balance_post(addrs, opts = {}) data, _status_code, _headers = balance_post_with_http_info(addrs, opts) data end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param addrs [String] command separated list of addresses @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 315 def balance_post_with_http_info(addrs, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.balance_post ...' end # verify the required parameter 'addrs' is set if @api_client.config.client_side_validation && addrs.nil? fail ArgumentError, "Missing the required parameter 'addrs' when calling DefaultApi.balance_post" end # resource path local_var_path = '/api/v1/balance' # query parameters query_params = opts[:query_params] || {} query_params[:'addrs'] = addrs # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#balance_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param [Hash] opts the optional parameters @option opts [String] :hash get block by hash @option opts [Integer] :seq get block by sequence number @return [Array<BlockSchema>]
# File lib/sky_api/api/default_api.rb, line 368 def block(opts = {}) data, _status_code, _headers = block_with_http_info(opts) data end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param [Hash] opts the optional parameters @option opts [String] :hash get block by hash @option opts [Integer] :seq get block by sequence number @return [Array<(Array<BlockSchema>, Integer, Hash)>] Array<BlockSchema> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 378 def block_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.block ...' end # resource path local_var_path = '/api/v1/block' # query parameters query_params = opts[:query_params] || {} query_params[:'hash'] = opts[:'hash'] if !opts[:'hash'].nil? query_params[:'seq'] = opts[:'seq'] if !opts[:'seq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<BlockSchema>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the blockchain metadata. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 426 def blockchain_metadata(opts = {}) data, _status_code, _headers = blockchain_metadata_with_http_info(opts) data end
Returns the blockchain metadata. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 434 def blockchain_metadata_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.blockchain_metadata ...' end # resource path local_var_path = '/api/v1/blockchain/metadata' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#blockchain_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the blockchain sync progress. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 480 def blockchain_progress(opts = {}) data, _status_code, _headers = blockchain_progress_with_http_info(opts) data end
Returns the blockchain sync progress. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 488 def blockchain_progress_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.blockchain_progress ...' end # resource path local_var_path = '/api/v1/blockchain/progress' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#blockchain_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param [Hash] opts the optional parameters @option opts [Integer] :start start seq @option opts [Integer] :_end end seq @option opts [Array<Integer>] :seq comma-separated list of block seqs @return [InlineResponse2001]
# File lib/sky_api/api/default_api.rb, line 537 def blocks(opts = {}) data, _status_code, _headers = blocks_with_http_info(opts) data end
Returns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param [Hash] opts the optional parameters @option opts [Integer] :start start seq @option opts [Integer] :_end end seq @option opts [Array<Integer>] :seq comma-separated list of block seqs @return [Array<(InlineResponse2001
, Integer, Hash)>] InlineResponse2001
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 548 def blocks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.blocks ...' end # resource path local_var_path = '/api/v1/blocks' # query parameters query_params = opts[:query_params] || {} query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? query_params[:'seq'] = @api_client.build_collection_param(opts[:'seq'], :multi) if !opts[:'seq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2001' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
coinSupplyHandler returns coin distribution supply stats @param [Hash] opts the optional parameters @return [InlineResponse2002]
# File lib/sky_api/api/default_api.rb, line 597 def coin_supply(opts = {}) data, _status_code, _headers = coin_supply_with_http_info(opts) data end
coinSupplyHandler returns coin distribution supply stats @param [Hash] opts the optional parameters @return [Array<(InlineResponse2002
, Integer, Hash)>] InlineResponse2002
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 605 def coin_supply_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.coin_supply ...' end # resource path local_var_path = '/api/v1/coinSupply' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2002' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#coin_supply\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a new CSRF token. Previous CSRF tokens are invalidated by this call. @param [Hash] opts the optional parameters @return [InlineResponse2003]
# File lib/sky_api/api/default_api.rb, line 651 def csrf(opts = {}) data, _status_code, _headers = csrf_with_http_info(opts) data end
Creates a new CSRF token. Previous CSRF tokens are invalidated by this call. @param [Hash] opts the optional parameters @return [Array<(InlineResponse2003
, Integer, Hash)>] InlineResponse2003
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 659 def csrf_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.csrf ...' end # resource path local_var_path = '/api/v1/csrf' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2003' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#csrf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @return [nil]
# File lib/sky_api/api/default_api.rb, line 706 def data_delete(opts = {}) data_delete_with_http_info(opts) nil end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 715 def data_delete_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.data_delete ...' end # resource path local_var_path = '/api/v2/data' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#data_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @return [Object]
# File lib/sky_api/api/default_api.rb, line 764 def data_get(opts = {}) data, _status_code, _headers = data_get_with_http_info(opts) data end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 773 def data_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.data_get ...' end # resource path local_var_path = '/api/v2/data' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#data_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @option opts [String] :val additional value. @return [nil]
# File lib/sky_api/api/default_api.rb, line 823 def data_post(opts = {}) data_post_with_http_info(opts) nil end
@param [Hash] opts the optional parameters @option opts [String] :type storage type. @option opts [String] :key key of the specific value to get. @option opts [String] :val additional value. @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 833 def data_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.data_post ...' end # resource path local_var_path = '/api/v2/data' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) header_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? header_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? header_params[:'val'] = opts[:'val'] if !opts[:'val'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#data_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\n They are not necessarily connected to. @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/sky_api/api/default_api.rb, line 882 def default_connections(opts = {}) data, _status_code, _headers = default_connections_with_http_info(opts) data end
defaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\n They are not necessarily connected to. @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 890 def default_connections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.default_connections ...' end # resource path local_var_path = '/api/v1/network/defaultConnections' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#default_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns node health data. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 936 def health(opts = {}) data, _status_code, _headers = health_with_http_info(opts) data end
Returns node health data. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 944 def health_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.health ...' end # resource path local_var_path = '/api/v1/health' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the most recent N blocks on the blockchain @param num [Integer] Num of blockss @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 991 def last_blocks(num, opts = {}) data, _status_code, _headers = last_blocks_with_http_info(num, opts) data end
Returns the most recent N blocks on the blockchain @param num [Integer] Num of blockss @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1000 def last_blocks_with_http_info(num, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.last_blocks ...' end # verify the required parameter 'num' is set if @api_client.config.client_side_validation && num.nil? fail ArgumentError, "Missing the required parameter 'num' when calling DefaultApi.last_blocks" end # resource path local_var_path = '/api/v1/last_blocks' # query parameters query_params = opts[:query_params] || {} query_params[:'num'] = num # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#last_blocks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint returns a specific connection. @param addr [String] Address
port @param [Hash] opts the optional parameters @return [NetworkConnectionSchema]
# File lib/sky_api/api/default_api.rb, line 1052 def network_connection(addr, opts = {}) data, _status_code, _headers = network_connection_with_http_info(addr, opts) data end
This endpoint returns a specific connection. @param addr [String] Address
port @param [Hash] opts the optional parameters @return [Array<(NetworkConnectionSchema
, Integer, Hash)>] NetworkConnectionSchema
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1061 def network_connection_with_http_info(addr, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.network_connection ...' end # verify the required parameter 'addr' is set if @api_client.config.client_side_validation && addr.nil? fail ArgumentError, "Missing the required parameter 'addr' when calling DefaultApi.network_connection" end # resource path local_var_path = '/api/v1/network/connection' # query parameters query_params = opts[:query_params] || {} query_params[:'addr'] = addr # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'NetworkConnectionSchema' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#network_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint returns all outgoings connections. @param [Hash] opts the optional parameters @option opts [String] :states Connection status. @option opts [String] :direction Direction of the connection. @return [InlineResponse2004]
# File lib/sky_api/api/default_api.rb, line 1114 def network_connections(opts = {}) data, _status_code, _headers = network_connections_with_http_info(opts) data end
This endpoint disconnects a connection by ID or address @param id [String] Address
id. @param [Hash] opts the optional parameters @return [nil]
# File lib/sky_api/api/default_api.rb, line 1181 def network_connections_disconnect(id, opts = {}) network_connections_disconnect_with_http_info(id, opts) nil end
This endpoint disconnects a connection by ID or address @param id [String] Address
id. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1190 def network_connections_disconnect_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_disconnect ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.network_connections_disconnect" end # resource path local_var_path = '/api/v1/network/connection/disconnect' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#network_connections_disconnect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint returns all connections found through peer exchange @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/sky_api/api/default_api.rb, line 1241 def network_connections_exchange(opts = {}) data, _status_code, _headers = network_connections_exchange_with_http_info(opts) data end
This endpoint returns all connections found through peer exchange @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1249 def network_connections_exchange_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_exchange ...' end # resource path local_var_path = '/api/v1/network/connections/exchange' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#network_connections_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
trustConnectionsHandler returns all trusted connections.\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses. @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/sky_api/api/default_api.rb, line 1295 def network_connections_trust(opts = {}) data, _status_code, _headers = network_connections_trust_with_http_info(opts) data end
trustConnectionsHandler returns all trusted connections.\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses. @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1303 def network_connections_trust_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections_trust ...' end # resource path local_var_path = '/api/v1/network/connections/trust' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#network_connections_trust\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint returns all outgoings connections. @param [Hash] opts the optional parameters @option opts [String] :states Connection status. @option opts [String] :direction Direction of the connection. @return [Array<(InlineResponse2004
, Integer, Hash)>] InlineResponse2004
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1124 def network_connections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.network_connections ...' end allowable_values = ["pending", "connected", "introduced"] if @api_client.config.client_side_validation && opts[:'states'] && !allowable_values.include?(opts[:'states']) fail ArgumentError, "invalid value for \"states\", must be one of #{allowable_values}" end allowable_values = ["connected", "introduced"] if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/network/connections' # query parameters query_params = opts[:query_params] || {} query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil? query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2004' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#network_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. @param [Hash] opts the optional parameters @option opts [Array<String>] :address @option opts [Array<String>] :hash @return [Object]
# File lib/sky_api/api/default_api.rb, line 1351 def outputs_get(opts = {}) data, _status_code, _headers = outputs_get_with_http_info(opts) data end
If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. @param [Hash] opts the optional parameters @option opts [Array<String>] :address @option opts [Array<String>] :hash @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1361 def outputs_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.outputs_get ...' end # resource path local_var_path = '/api/v1/outputs' # query parameters query_params = opts[:query_params] || {} query_params[:'address'] = @api_client.build_collection_param(opts[:'address'], :multi) if !opts[:'address'].nil? query_params[:'hash'] = @api_client.build_collection_param(opts[:'hash'], :multi) if !opts[:'hash'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#outputs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. @param [Hash] opts the optional parameters @option opts [String] :address @option opts [String] :hash @return [Object]
# File lib/sky_api/api/default_api.rb, line 1411 def outputs_post(opts = {}) data, _status_code, _headers = outputs_post_with_http_info(opts) data end
If neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified. @param [Hash] opts the optional parameters @option opts [String] :address @option opts [String] :hash @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1421 def outputs_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.outputs_post ...' end # resource path local_var_path = '/api/v1/outputs' # query parameters query_params = opts[:query_params] || {} query_params[:'address'] = opts[:'address'] if !opts[:'address'].nil? query_params[:'hash'] = opts[:'hash'] if !opts[:'hash'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#outputs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @return [Array<InlineResponse20010>]
# File lib/sky_api/api/default_api.rb, line 1468 def pending_txs(opts = {}) data, _status_code, _headers = pending_txs_with_http_info(opts) data end
@param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20010>, Integer, Hash)>] Array<InlineResponse20010> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1475 def pending_txs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.pending_txs ...' end # resource path local_var_path = '/api/v1/pendingTxs' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<InlineResponse20010>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#pending_txs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Broadcasts all unconfirmed transactions from the unconfirmed transaction pool @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 1521 def resend_unconfirmed_txns(opts = {}) data, _status_code, _headers = resend_unconfirmed_txns_with_http_info(opts) data end
Broadcasts all unconfirmed transactions from the unconfirmed transaction pool @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1529 def resend_unconfirmed_txns_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.resend_unconfirmed_txns ...' end # resource path local_var_path = '/api/v1/resendUnconfirmedTxns' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application-json', 'application/json', 'application/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#resend_unconfirmed_txns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the top skycoin holders. @param [Hash] opts the optional parameters @option opts [Boolean] :include_distribution include distribution addresses or not, default value false @option opts [String] :n include distribution addresses or not, default value false @return [Object]
# File lib/sky_api/api/default_api.rb, line 1577 def richlist(opts = {}) data, _status_code, _headers = richlist_with_http_info(opts) data end
Returns the top skycoin holders. @param [Hash] opts the optional parameters @option opts [Boolean] :include_distribution include distribution addresses or not, default value false @option opts [String] :n include distribution addresses or not, default value false @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1587 def richlist_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.richlist ...' end # resource path local_var_path = '/api/v1/richlist' # query parameters query_params = opts[:query_params] || {} query_params[:'include-distribution'] = opts[:'include_distribution'] if !opts[:'include_distribution'].nil? query_params[:'n'] = opts[:'n'] if !opts[:'n'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#richlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a transaction identified by its txid hash with just id @param txid [String] transaction Id @param [Hash] opts the optional parameters @return [Transaction]
# File lib/sky_api/api/default_api.rb, line 1636 def transaction(txid, opts = {}) data, _status_code, _headers = transaction_with_http_info(txid, opts) data end
Broadcast a hex-encoded, serialized transaction to the network. @param rawtx [String] hex-encoded serialized transaction string. @param [Hash] opts the optional parameters @return [String]
# File lib/sky_api/api/default_api.rb, line 1697 def transaction_inject(rawtx, opts = {}) data, _status_code, _headers = transaction_inject_with_http_info(rawtx, opts) data end
Broadcast a hex-encoded, serialized transaction to the network. @param rawtx [String] hex-encoded serialized transaction string. @param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1706 def transaction_inject_with_http_info(rawtx, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_inject ...' end # verify the required parameter 'rawtx' is set if @api_client.config.client_side_validation && rawtx.nil? fail ArgumentError, "Missing the required parameter 'rawtx' when calling DefaultApi.transaction_inject" end # resource path local_var_path = '/api/v1/injectTransaction' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'application/xml']) header_params[:'rawtx'] = rawtx # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction_inject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [TransactionV2ParamsAddress] :transaction_v2_params_address @return [InlineResponse2008]
# File lib/sky_api/api/default_api.rb, line 1757 def transaction_post(opts = {}) data, _status_code, _headers = transaction_post_with_http_info(opts) data end
@param transaction_v2_params_unspent [TransactionV2ParamsUnspent] Unspent parameters @param [Hash] opts the optional parameters @return [InlineResponse2008]
# File lib/sky_api/api/default_api.rb, line 1813 def transaction_post_unspent(transaction_v2_params_unspent, opts = {}) data, _status_code, _headers = transaction_post_unspent_with_http_info(transaction_v2_params_unspent, opts) data end
@param transaction_v2_params_unspent [TransactionV2ParamsUnspent] Unspent parameters @param [Hash] opts the optional parameters @return [Array<(InlineResponse2008
, Integer, Hash)>] InlineResponse2008
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1821 def transaction_post_unspent_with_http_info(transaction_v2_params_unspent, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_post_unspent ...' end # verify the required parameter 'transaction_v2_params_unspent' is set if @api_client.config.client_side_validation && transaction_v2_params_unspent.nil? fail ArgumentError, "Missing the required parameter 'transaction_v2_params_unspent' when calling DefaultApi.transaction_post_unspent" end # resource path local_var_path = '/api/v2/transaction/unspent' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(transaction_v2_params_unspent) # return_type return_type = opts[:return_type] || 'InlineResponse2008' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction_post_unspent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [TransactionV2ParamsAddress] :transaction_v2_params_address @return [Array<(InlineResponse2008
, Integer, Hash)>] InlineResponse2008
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1765 def transaction_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_post ...' end # resource path local_var_path = '/api/v2/transaction' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'transaction_v2_params_address']) # return_type return_type = opts[:return_type] || 'InlineResponse2008' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed. @param [Hash] opts the optional parameters @option opts [String] :txid Transaction
id hash @return [Object]
# File lib/sky_api/api/default_api.rb, line 1874 def transaction_raw(opts = {}) data, _status_code, _headers = transaction_raw_with_http_info(opts) data end
Returns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed. @param [Hash] opts the optional parameters @option opts [String] :txid Transaction
id hash @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1883 def transaction_raw_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_raw ...' end # resource path local_var_path = '/api/v2/transaction/raw' # query parameters query_params = opts[:query_params] || {} query_params[:'txid'] = opts[:'txid'] if !opts[:'txid'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Decode and verify an encoded transaction @param transaction_verify_request [TransactionVerifyRequest] @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 1931 def transaction_verify(transaction_verify_request, opts = {}) data, _status_code, _headers = transaction_verify_with_http_info(transaction_verify_request, opts) data end
Decode and verify an encoded transaction @param transaction_verify_request [TransactionVerifyRequest] @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1940 def transaction_verify_with_http_info(transaction_verify_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction_verify ...' end # verify the required parameter 'transaction_verify_request' is set if @api_client.config.client_side_validation && transaction_verify_request.nil? fail ArgumentError, "Missing the required parameter 'transaction_verify_request' when calling DefaultApi.transaction_verify" end # resource path local_var_path = '/api/v2/transaction/verify' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(transaction_verify_request) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a transaction identified by its txid hash with just id @param txid [String] transaction Id @param [Hash] opts the optional parameters @return [Array<(Transaction
, Integer, Hash)>] Transaction
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 1645 def transaction_with_http_info(txid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transaction ...' end # verify the required parameter 'txid' is set if @api_client.config.client_side_validation && txid.nil? fail ArgumentError, "Missing the required parameter 'txid' when calling DefaultApi.transaction" end # resource path local_var_path = '/api/v1/transaction' # query parameters query_params = opts[:query_params] || {} query_params[:'txid'] = txid # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Transaction' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns transactions that match the filters. @param [Hash] opts the optional parameters @option opts [String] :addrs command separated list of addresses @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all] @return [Object]
# File lib/sky_api/api/default_api.rb, line 1994 def transactions_get(opts = {}) data, _status_code, _headers = transactions_get_with_http_info(opts) data end
Returns transactions that match the filters. @param [Hash] opts the optional parameters @option opts [String] :addrs command separated list of addresses @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all] @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2004 def transactions_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transactions_get ...' end # resource path local_var_path = '/api/v1/transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'addrs'] = opts[:'addrs'] if !opts[:'addrs'].nil? query_params[:'confirmed'] = opts[:'confirmed'] if !opts[:'confirmed'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transactions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns transactions that match the filters. @param [Hash] opts the optional parameters @option opts [String] :addrs command separated list of addresses @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all] @return [Object]
# File lib/sky_api/api/default_api.rb, line 2054 def transactions_post(opts = {}) data, _status_code, _headers = transactions_post_with_http_info(opts) data end
Returns transactions that match the filters. @param [Hash] opts the optional parameters @option opts [String] :addrs command separated list of addresses @option opts [String] :confirmed Whether the transactions should be confirmed [optional, must be 0 or 1; if not provided, returns all] @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2064 def transactions_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transactions_post ...' end # resource path local_var_path = '/api/v1/transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'addrs'] = opts[:'addrs'] if !opts[:'addrs'].nil? query_params[:'confirmed'] = opts[:'confirmed'] if !opts[:'confirmed'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transactions_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns an unspent output by ID. @param [Hash] opts the optional parameters @option opts [String] :uxid uxid to filter by @return [Object]
# File lib/sky_api/api/default_api.rb, line 2113 def uxout(opts = {}) data, _status_code, _headers = uxout_with_http_info(opts) data end
Returns an unspent output by ID. @param [Hash] opts the optional parameters @option opts [String] :uxid uxid to filter by @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2122 def uxout_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.uxout ...' end # resource path local_var_path = '/api/v1/uxout' # query parameters query_params = opts[:query_params] || {} query_params[:'uxid'] = opts[:'uxid'] if !opts[:'uxid'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#uxout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Verifies a Skycoin address. @param address [Object] Address
id. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2170 def verify_address(address, opts = {}) data, _status_code, _headers = verify_address_with_http_info(address, opts) data end
Verifies a Skycoin address. @param address [Object] Address
id. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2179 def verify_address_with_http_info(address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.verify_address ...' end # verify the required parameter 'address' is set if @api_client.config.client_side_validation && address.nil? fail ArgumentError, "Missing the required parameter 'address' when calling DefaultApi.verify_address" end # resource path local_var_path = '/api/v2/address/verify' # query parameters query_params = opts[:query_params] || {} query_params[:'address'] = address # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#verify_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
versionHandler returns the application version info @param [Hash] opts the optional parameters @return [InlineResponse2005]
# File lib/sky_api/api/default_api.rb, line 2230 def version(opts = {}) data, _status_code, _headers = version_with_http_info(opts) data end
versionHandler returns the application version info @param [Hash] opts the optional parameters @return [Array<(InlineResponse2005
, Integer, Hash)>] InlineResponse2005
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2238 def version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.version ...' end # resource path local_var_path = '/api/v1/version' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2005' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a wallet by id. @param id [String] tags to filter by @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2285 def wallet(id, opts = {}) data, _status_code, _headers = wallet_with_http_info(id, opts) data end
Returns the wallet's balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param id [String] tags to filter by @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2346 def wallet_balance(id, opts = {}) data, _status_code, _headers = wallet_balance_with_http_info(id, opts) data end
Returns the wallet's balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends. @param id [String] tags to filter by @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2355 def wallet_balance_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_balance ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_balance" end # resource path local_var_path = '/api/v1/wallet/balance' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Loads wallet from seed, will scan ahead N address and load addresses till the last one that have coins. @param seed [String] Wallet seed. @param label [String] Wallet label. @param [Hash] opts the optional parameters @option opts [Integer] :scan The number of addresses to scan ahead for balances. @option opts [Boolean] :encrypt Encrypt wallet. @option opts [String] :password Wallet Password @return [Object]
# File lib/sky_api/api/default_api.rb, line 2411 def wallet_create(seed, label, opts = {}) data, _status_code, _headers = wallet_create_with_http_info(seed, label, opts) data end
Loads wallet from seed, will scan ahead N address and load addresses till the last one that have coins. @param seed [String] Wallet seed. @param label [String] Wallet label. @param [Hash] opts the optional parameters @option opts [Integer] :scan The number of addresses to scan ahead for balances. @option opts [Boolean] :encrypt Encrypt wallet. @option opts [String] :password Wallet Password @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2424 def wallet_create_with_http_info(seed, label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_create ...' end # verify the required parameter 'seed' is set if @api_client.config.client_side_validation && seed.nil? fail ArgumentError, "Missing the required parameter 'seed' when calling DefaultApi.wallet_create" end # verify the required parameter 'label' is set if @api_client.config.client_side_validation && label.nil? fail ArgumentError, "Missing the required parameter 'label' when calling DefaultApi.wallet_create" end if @api_client.config.client_side_validation && !opts[:'scan'].nil? && opts[:'scan'] < 1 fail ArgumentError, 'invalid value for "opts[:"scan"]" when calling DefaultApi.wallet_create, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/wallet/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'seed'] = seed header_params[:'label'] = label header_params[:'scan'] = opts[:'scan'] if !opts[:'scan'].nil? header_params[:'encrypt'] = opts[:'encrypt'] if !opts[:'encrypt'].nil? header_params[:'password'] = opts[:'password'] if !opts[:'password'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Decrypts wallet. @param id [String] Wallet id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2489 def wallet_decrypt(id, password, opts = {}) data, _status_code, _headers = wallet_decrypt_with_http_info(id, password, opts) data end
Decrypts wallet. @param id [String] Wallet id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2499 def wallet_decrypt_with_http_info(id, password, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_decrypt ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_decrypt" end # verify the required parameter 'password' is set if @api_client.config.client_side_validation && password.nil? fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_decrypt" end # resource path local_var_path = '/api/v1/wallet/decrypt' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'id'] = id header_params[:'password'] = password # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_decrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Encrypt wallet. @param id [String] Wallet id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2557 def wallet_encrypt(id, password, opts = {}) data, _status_code, _headers = wallet_encrypt_with_http_info(id, password, opts) data end
Encrypt wallet. @param id [String] Wallet id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2567 def wallet_encrypt_with_http_info(id, password, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_encrypt ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_encrypt" end # verify the required parameter 'password' is set if @api_client.config.client_side_validation && password.nil? fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_encrypt" end # resource path local_var_path = '/api/v1/wallet/encrypt' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'id'] = id header_params[:'password'] = password # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_encrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the wallet directory path @param addr [String] Address
port @param [Hash] opts the optional parameters @return [InlineResponse2007]
# File lib/sky_api/api/default_api.rb, line 2624 def wallet_folder(addr, opts = {}) data, _status_code, _headers = wallet_folder_with_http_info(addr, opts) data end
Returns the wallet directory path @param addr [String] Address
port @param [Hash] opts the optional parameters @return [Array<(InlineResponse2007
, Integer, Hash)>] InlineResponse2007
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2633 def wallet_folder_with_http_info(addr, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_folder ...' end # verify the required parameter 'addr' is set if @api_client.config.client_side_validation && addr.nil? fail ArgumentError, "Missing the required parameter 'addr' when calling DefaultApi.wallet_folder" end # resource path local_var_path = '/api/v1/wallets/folderName' # query parameters query_params = opts[:query_params] || {} query_params[:'addr'] = addr # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2007' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Generates new addresses @param id [String] Wallet Id @param [Hash] opts the optional parameters @option opts [String] :num The number you want to generate @option opts [String] :password Wallet Password @return [Object]
# File lib/sky_api/api/default_api.rb, line 2687 def wallet_new_address(id, opts = {}) data, _status_code, _headers = wallet_new_address_with_http_info(id, opts) data end
Generates new addresses @param id [String] Wallet Id @param [Hash] opts the optional parameters @option opts [String] :num The number you want to generate @option opts [String] :password Wallet Password @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2698 def wallet_new_address_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_new_address ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_new_address" end # resource path local_var_path = '/api/v1/wallet/newAddress' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil? query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_new_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the wallet directory path @param [Hash] opts the optional parameters @option opts [String] :entropy Entropy bitSize. @return [Object]
# File lib/sky_api/api/default_api.rb, line 2752 def wallet_new_seed(opts = {}) data, _status_code, _headers = wallet_new_seed_with_http_info(opts) data end
Returns the wallet directory path @param [Hash] opts the optional parameters @option opts [String] :entropy Entropy bitSize. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2761 def wallet_new_seed_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_new_seed ...' end allowable_values = ["128", "256"] if @api_client.config.client_side_validation && opts[:'entropy'] && !allowable_values.include?(opts[:'entropy']) fail ArgumentError, "invalid value for \"entropy\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/wallet/newSeed' # query parameters query_params = opts[:query_params] || {} query_params[:'entropy'] = opts[:'entropy'] if !opts[:'entropy'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_new_seed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned. @param id [String] Wallet id. @param seed [String] Wallet seed. @param [Hash] opts the optional parameters @option opts [String] :password Wallet password. @return [Object]
# File lib/sky_api/api/default_api.rb, line 2815 def wallet_recover(id, seed, opts = {}) data, _status_code, _headers = wallet_recover_with_http_info(id, seed, opts) data end
Recovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned. @param id [String] Wallet id. @param seed [String] Wallet seed. @param [Hash] opts the optional parameters @option opts [String] :password Wallet password. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2826 def wallet_recover_with_http_info(id, seed, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_recover ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_recover" end # verify the required parameter 'seed' is set if @api_client.config.client_side_validation && seed.nil? fail ArgumentError, "Missing the required parameter 'seed' when calling DefaultApi.wallet_recover" end # resource path local_var_path = '/api/v2/wallet/recover' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'id'] = id header_params[:'seed'] = seed header_params[:'password'] = opts[:'password'] if !opts[:'password'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_recover\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned. @param id [String] Wallet Id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 2885 def wallet_seed(id, password, opts = {}) data, _status_code, _headers = wallet_seed_with_http_info(id, password, opts) data end
Verifies a wallet seed. @param [Hash] opts the optional parameters @option opts [String] :seed Seed to be verified. @return [Object]
# File lib/sky_api/api/default_api.rb, line 2952 def wallet_seed_verify(opts = {}) data, _status_code, _headers = wallet_seed_verify_with_http_info(opts) data end
Verifies a wallet seed. @param [Hash] opts the optional parameters @option opts [String] :seed Seed to be verified. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2961 def wallet_seed_verify_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_seed_verify ...' end # resource path local_var_path = '/api/v2/wallet/seed/verify' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) header_params[:'seed'] = opts[:'seed'] if !opts[:'seed'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_seed_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
This endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned. @param id [String] Wallet Id. @param password [String] Wallet password. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2895 def wallet_seed_with_http_info(id, password, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_seed ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_seed" end # verify the required parameter 'password' is set if @api_client.config.client_side_validation && password.nil? fail ArgumentError, "Missing the required parameter 'password' when calling DefaultApi.wallet_seed" end # resource path local_var_path = '/api/v1/wallet/seed' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id query_params[:'password'] = password # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_seed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a signed transaction @param wallet_transaction_request [WalletTransactionRequest] @param [Hash] opts the optional parameters @return [Object]
# File lib/sky_api/api/default_api.rb, line 3009 def wallet_transaction(wallet_transaction_request, opts = {}) data, _status_code, _headers = wallet_transaction_with_http_info(wallet_transaction_request, opts) data end
Creates a signed transaction @param wallet_transaction_sign_request [WalletTransactionSignRequest] @param [Hash] opts the optional parameters @return [InlineResponse2009]
# File lib/sky_api/api/default_api.rb, line 3071 def wallet_transaction_sign(wallet_transaction_sign_request, opts = {}) data, _status_code, _headers = wallet_transaction_sign_with_http_info(wallet_transaction_sign_request, opts) data end
Creates a signed transaction @param wallet_transaction_sign_request [WalletTransactionSignRequest] @param [Hash] opts the optional parameters @return [Array<(InlineResponse2009
, Integer, Hash)>] InlineResponse2009
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3080 def wallet_transaction_sign_with_http_info(wallet_transaction_sign_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transaction_sign ...' end # verify the required parameter 'wallet_transaction_sign_request' is set if @api_client.config.client_side_validation && wallet_transaction_sign_request.nil? fail ArgumentError, "Missing the required parameter 'wallet_transaction_sign_request' when calling DefaultApi.wallet_transaction_sign" end # resource path local_var_path = '/api/v2/wallet/transaction/sign' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(wallet_transaction_sign_request) # return_type return_type = opts[:return_type] || 'InlineResponse2009' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_transaction_sign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a signed transaction @param wallet_transaction_request [WalletTransactionRequest] @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3018 def wallet_transaction_with_http_info(wallet_transaction_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transaction ...' end # verify the required parameter 'wallet_transaction_request' is set if @api_client.config.client_side_validation && wallet_transaction_request.nil? fail ArgumentError, "Missing the required parameter 'wallet_transaction_request' when calling DefaultApi.wallet_transaction" end # resource path local_var_path = '/api/v1/wallet/transaction' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(wallet_transaction_request) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param id [String] Wallet Id. @param [Hash] opts the optional parameters @return [InlineResponse2006]
# File lib/sky_api/api/default_api.rb, line 3132 def wallet_transactions(id, opts = {}) data, _status_code, _headers = wallet_transactions_with_http_info(id, opts) data end
@param id [String] Wallet Id. @param [Hash] opts the optional parameters @return [Array<(InlineResponse2006
, Integer, Hash)>] InlineResponse2006
data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3140 def wallet_transactions_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_transactions ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_transactions" end # resource path local_var_path = '/api/v1/wallet/transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InlineResponse2006' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Unloads wallet from the wallet service. @param id [String] Wallet Id. @param [Hash] opts the optional parameters @return [nil]
# File lib/sky_api/api/default_api.rb, line 3192 def wallet_unload(id, opts = {}) wallet_unload_with_http_info(id, opts) nil end
Unloads wallet from the wallet service. @param id [String] Wallet Id. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3201 def wallet_unload_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_unload ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_unload" end # resource path local_var_path = '/api/v1/wallet/unload' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_unload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update the wallet. @param id [String] Wallet Id. @param label [String] The label the wallet will be updated to. @param [Hash] opts the optional parameters @return [String]
# File lib/sky_api/api/default_api.rb, line 3254 def wallet_update(id, label, opts = {}) data, _status_code, _headers = wallet_update_with_http_info(id, label, opts) data end
Update the wallet. @param id [String] Wallet Id. @param label [String] The label the wallet will be updated to. @param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3264 def wallet_update_with_http_info(id, label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet_update ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet_update" end # verify the required parameter 'label' is set if @api_client.config.client_side_validation && label.nil? fail ArgumentError, "Missing the required parameter 'label' when calling DefaultApi.wallet_update" end # resource path local_var_path = '/api/v1/wallet/update' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'application/xml']) header_params[:'id'] = id header_params[:'label'] = label # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || ['csrfAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a wallet by id. @param id [String] tags to filter by @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 2294 def wallet_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallet ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.wallet" end # resource path local_var_path = '/api/v1/wallet' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns all loaded wallets @param [Hash] opts the optional parameters @return [Array<Object>]
# File lib/sky_api/api/default_api.rb, line 3320 def wallets(opts = {}) data, _status_code, _headers = wallets_with_http_info(opts) data end
Returns all loaded wallets @param [Hash] opts the optional parameters @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
# File lib/sky_api/api/default_api.rb, line 3328 def wallets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.wallets ...' end # resource path local_var_path = '/api/v1/wallets' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<Object>' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end